mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
Bluetooth: Fix code style error
checkpatch.pl flags the zero-length array members in struct
qca_dump_hdr:
ERROR: Use C99 flexible arrays - see
https://docs.kernel.org/process/deprecated.html#zero-length-and-one-element-arrays
#3110: FILE: drivers/bluetooth/btusb.c:3110:
+ u8 data0[0];
Replace them with DECLARE_FLEX_ARRAY(), since C99 flexible array
members are not permitted inside unions or as the sole member of
a struct.
The struct layout is unchanged, and everything compiles with the
change.
Link: https://docs.kernel.org/process/deprecated.html#zero-length-and-one-element-arrays
Signed-off-by: Jeremy Dean <deaner92@yahoo.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
8be5ec1f66
commit
00b201656d
|
|
@ -3316,10 +3316,10 @@ struct qca_dump_hdr {
|
|||
__le16 seqno;
|
||||
u8 reserved;
|
||||
union {
|
||||
u8 data[0];
|
||||
DECLARE_FLEX_ARRAY(u8, data);
|
||||
struct {
|
||||
__le32 ram_dump_size;
|
||||
u8 data0[0];
|
||||
DECLARE_FLEX_ARRAY(u8, data0);
|
||||
} __packed;
|
||||
};
|
||||
} __packed;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user