ps3_gelic: Use [] to denote a flexible array member
diff mbox series

Message ID 20190617115044.4406-1-geert+renesas@glider.be
State Accepted
Delegated to: David Miller
Headers show
Series
  • ps3_gelic: Use [] to denote a flexible array member
Related show

Commit Message

Geert Uytterhoeven June 17, 2019, 11:50 a.m. UTC
Flexible array members should be denoted using [] instead of [0], else
gcc will not warn when they are no longer at the end of a struct.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/net/ethernet/toshiba/ps3_gelic_net.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller June 18, 2019, 5:43 p.m. UTC | #1
From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: Mon, 17 Jun 2019 13:50:44 +0200

> Flexible array members should be denoted using [] instead of [0], else
> gcc will not warn when they are no longer at the end of a struct.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Applied to net-next, thanks.

Patch
diff mbox series

diff --git a/drivers/net/ethernet/toshiba/ps3_gelic_net.h b/drivers/net/ethernet/toshiba/ps3_gelic_net.h
index 3ecddb72f45aa80f..051033580f0a6f9e 100644
--- a/drivers/net/ethernet/toshiba/ps3_gelic_net.h
+++ b/drivers/net/ethernet/toshiba/ps3_gelic_net.h
@@ -301,7 +301,7 @@  struct gelic_card {
 	 */
 	unsigned int irq;
 	struct gelic_descr *tx_top, *rx_top;
-	struct gelic_descr descr[0]; /* must be the last */
+	struct gelic_descr descr[]; /* must be the last */
 };
 
 struct gelic_port {