* [PATCH] ps3: Use [] to denote a flexible array member
@ 2019-06-17 9:07 Geert Uytterhoeven
2019-06-30 8:37 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2019-06-17 9:07 UTC (permalink / raw)
To: Geoff Levand, Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
Cc: linuxppc-dev, linux-kernel, 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>
---
arch/powerpc/include/asm/ps3stor.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/ps3stor.h b/arch/powerpc/include/asm/ps3stor.h
index d9f6589bc107bafa..1d8279014f226926 100644
--- a/arch/powerpc/include/asm/ps3stor.h
+++ b/arch/powerpc/include/asm/ps3stor.h
@@ -39,7 +39,7 @@ struct ps3_storage_device {
unsigned int num_regions;
unsigned long accessible_regions;
unsigned int region_idx; /* first accessible region */
- struct ps3_storage_region regions[0]; /* Must be last */
+ struct ps3_storage_region regions[]; /* Must be last */
};
static inline struct ps3_storage_device *to_ps3_storage_device(struct device *dev)
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ps3: Use [] to denote a flexible array member
2019-06-17 9:07 [PATCH] ps3: Use [] to denote a flexible array member Geert Uytterhoeven
@ 2019-06-30 8:37 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2019-06-30 8:37 UTC (permalink / raw)
To: Geert Uytterhoeven, Geoff Levand, Benjamin Herrenschmidt, Paul Mackerras
Cc: linuxppc-dev, linux-kernel, Geert Uytterhoeven
On Mon, 2019-06-17 at 09:07:13 UTC, 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>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/0b1be03f25bb4c92de6408da4de9361f4cb50ae3
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-30 8:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 9:07 [PATCH] ps3: Use [] to denote a flexible array member Geert Uytterhoeven
2019-06-30 8:37 ` Michael Ellerman
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).