summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/diag.h
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2023-04-06 08:28:42 -0600
committerVasily Gorbik <gor@linux.ibm.com>2023-04-13 17:36:28 +0200
commit3071e9b39106e1b9576584a372f446c23b258e3f (patch)
treee816edc8744d08a311a7a6b030d336b6b3387b1b /arch/s390/include/asm/diag.h
parent81e8479649853ffafc714aca4a9c0262efd3160a (diff)
s390/diag: replace zero-length array with flexible-array member
Zero-length arrays are deprecated [1] and have to be replaced by C99 flexible-array members. This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines on memcpy() and help to make progress towards globally enabling -fstrict-flex-arrays=3 [2] Link: https://github.com/KSPP/linux/issues/78 [1] Link: https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602902.html [2] Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/ZC7XGpUtVhqlRLhH@work Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/diag.h')
-rw-r--r--arch/s390/include/asm/diag.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/include/asm/diag.h b/arch/s390/include/asm/diag.h
index 674a939f16ee..902e0330dd91 100644
--- a/arch/s390/include/asm/diag.h
+++ b/arch/s390/include/asm/diag.h
@@ -90,7 +90,7 @@ struct diag8c {
u8 num_partitions;
u16 width;
u16 height;
- u8 data[0];
+ u8 data[];
} __packed __aligned(4);
extern int diag8c(struct diag8c *out, struct ccw_dev_id *devno);