dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: sh: usb-dmac: Use [] to denote a flexible array member
@ 2019-06-19 12:45 Geert Uytterhoeven
  2019-06-19 14:09 ` Simon Horman
  2019-06-25  4:21 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2019-06-19 12:45 UTC (permalink / raw)
  To: Vinod Koul, Dan Williams, Yoshihiro Shimoda
  Cc: dmaengine, linux-renesas-soc, Geert Uytterhoeven

Flexible array members should be denoted using [] instead of [0], else
gcc will not warn when they are no longer at the end of the structure.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/dma/sh/usb-dmac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/sh/usb-dmac.c b/drivers/dma/sh/usb-dmac.c
index 0afabf395930ed94..17063aaf51bce98b 100644
--- a/drivers/dma/sh/usb-dmac.c
+++ b/drivers/dma/sh/usb-dmac.c
@@ -57,7 +57,7 @@ struct usb_dmac_desc {
 	u32 residue;
 	struct list_head node;
 	dma_cookie_t done_cookie;
-	struct usb_dmac_sg sg[0];
+	struct usb_dmac_sg sg[];
 };
 
 #define to_usb_dmac_desc(vd)	container_of(vd, struct usb_dmac_desc, vd)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-25  4:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-19 12:45 [PATCH] dmaengine: sh: usb-dmac: Use [] to denote a flexible array member Geert Uytterhoeven
2019-06-19 14:09 ` Simon Horman
2019-06-25  4:21 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).