dmaengine: sh: rcar-dmac: Replace zero-length arrays with DECLARE_FLEX_ARRAY() helper
Subsystems (2)
PATCH 1/1 dmaengine: sh: rcar-dmac: Replace zero-length arrays with DECLARE_FLEX_ARRAY() helper
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations in anonymous union with the new DECLARE_FLEX_ARRAY() helper macro.
This helper allows for flexible-array members in unions.
--- drivers/dma/sh/rcar-dmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma/sh/rcar-dmac.c +2 -2
@@ -103,8 +103,8 @@ struct rcar_dmac_desc_page {struct list_head node;union { -struct rcar_dmac_desc descs[0 ]; -struct rcar_dmac_xfer_chunk chunks[0 ]; + DECLARE_FLEX_ARRAY(struct rcar_dmac_desc, descs); + DECLARE_FLEX_ARRAY(struct rcar_dmac_xfer_chunk, chunks); }; };
Signature · 1 line
2.34.1
Quoted 11 lines · Gustavo A. R. Silva
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations in anonymous union with the new
DECLARE_FLEX_ARRAY()helper macro.This helper allows for flexible-array members in unions.
Signature · 1 line
Kees Cook
Quoted 6 lines · Gustavo A. R. Silva
Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members, instead. So, replace zero-length arrays declarations in anonymous union with the new
DECLARE_FLEX_ARRAY()helper macro.This helper allows for flexible-array members in unions.
Applied, thanks
Signature · 1 line
~Vinod