powerpc/ps3: Use [] to denote a flexible array member
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 17 Jun 2019 09:07:13 +0000 (11:07 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 19 Jun 2019 10:05:08 +0000 (20:05 +1000)
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>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/ps3stor.h

index 6fcaf714fa50254aa86eae83883a0ec86e369e43..d5767ba0670b9d5ee9a3660b8100dbc02ad742ac 100644 (file)
@@ -51,7 +51,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)