* [PATCH][next] bna: bfi.h: Avoid the use of one-element array
@ 2020-07-22 18:50 Gustavo A. R. Silva
2020-07-23 1:12 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2020-07-22 18:50 UTC (permalink / raw)
To: Rasesh Mody, Sudarsana Kalluru, David S. Miller, Jakub Kicinski
Cc: GR-Linux-NIC-Dev, netdev, linux-kernel, Gustavo A. R. Silva
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] https://github.com/KSPP/linux/issues/79
[2] https://github.com/KSPP/linux/issues/86
Tested-by: kernel test robot <lkp@intel.com>
Link: https://github.com/GustavoARSilva/linux-hardening/blob/master/cii/0-day/bfi-20200718.md
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
drivers/net/ethernet/brocade/bna/bfi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/brocade/bna/bfi.h b/drivers/net/ethernet/brocade/bna/bfi.h
index 09c912e984fe..f780d42c946d 100644
--- a/drivers/net/ethernet/brocade/bna/bfi.h
+++ b/drivers/net/ethernet/brocade/bna/bfi.h
@@ -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 { \
--
2.27.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] bna: bfi.h: Avoid the use of one-element array
2020-07-22 18:50 [PATCH][next] bna: bfi.h: Avoid the use of one-element array Gustavo A. R. Silva
@ 2020-07-23 1:12 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-07-23 1:12 UTC (permalink / raw)
To: gustavoars; +Cc: rmody, skalluru, kuba, GR-Linux-NIC-Dev, netdev, linux-kernel
From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Date: Wed, 22 Jul 2020 13:50:24 -0500
> 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] https://github.com/KSPP/linux/issues/79
> [2] https://github.com/KSPP/linux/issues/86
>
> Tested-by: kernel test robot <lkp@intel.com>
> Link: https://github.com/GustavoARSilva/linux-hardening/blob/master/cii/0-day/bfi-20200718.md
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-23 1:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22 18:50 [PATCH][next] bna: bfi.h: Avoid the use of one-element array Gustavo A. R. Silva
2020-07-23 1:12 ` David Miller
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).