dmaengine Archive on lore.kernel.org
 help / color / 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	[flat|nested] 3+ messages in thread

* Re: [PATCH] dmaengine: sh: usb-dmac: Use [] to denote a flexible array member
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2019-06-19 14:09 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Vinod Koul, Dan Williams, Yoshihiro Shimoda, dmaengine,
	linux-renesas-soc

On Wed, Jun 19, 2019 at 02:45:55PM +0200, Geert Uytterhoeven wrote:
> 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>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>


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

* Re: [PATCH] dmaengine: sh: usb-dmac: Use [] to denote a flexible array member
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2019-06-25  4:21 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Dan Williams, Yoshihiro Shimoda, dmaengine, linux-renesas-soc

On 19-06-19, 14:45, Geert Uytterhoeven wrote:
> 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.

Applied, thanks

-- 
~Vinod

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

end of thread, back to index

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

dmaengine Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dmaengine/0 dmaengine/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dmaengine dmaengine/ https://lore.kernel.org/dmaengine \
		dmaengine@vger.kernel.org dmaengine@archiver.kernel.org
	public-inbox-index dmaengine


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.dmaengine


AGPL code for this site: git clone https://public-inbox.org/ public-inbox