Skip to content

Commit

Permalink
bna: bfi.h: Avoid the use of one-element array
Browse files Browse the repository at this point in the history
One-element arrays are being deprecated[1]. Replace the one-element
array with a simple value type 'u8 rsvd'[2], once it seems this is
just a placeholder for alignment.

[1] KSPP#79
[2] KSPP#86

Tested-by: kernel test robot <[email protected]>
Link: https://github.com/GustavoARSilva/linux-hardening/blob/master/cii/0-day/bfi-20200718.md
Signed-off-by: Gustavo A. R. Silva <[email protected]>
  • Loading branch information
GustavoARSilva authored and intel-lab-lkp committed Jul 22, 2020
1 parent 4fa640d commit 26a2344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/brocade/bna/bfi.h
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ struct bfi_msgq_mhdr {
u16 msg_token;
u16 num_entries;
u8 enet_id;
u8 rsvd[1];
u8 rsvd;
} __packed;

#define bfi_msgq_mhdr_set(_mh, _mc, _mid, _tok, _enet_id) do { \
Expand Down

0 comments on commit 26a2344

Please sign in to comment.