netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] tg3: Avoid the use of one-element array
@ 2020-07-22 18:43 Gustavo A. R. Silva
  2020-07-22 18:55 ` Michael Chan
  2020-07-23  1:11 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Gustavo A. R. Silva @ 2020-07-22 18:43 UTC (permalink / raw)
  To: Siva Reddy Kallam, Prashant Sreedharan, Michael Chan,
	David S. Miller, Jakub Kicinski
  Cc: netdev, linux-kernel, Gustavo A. R. Silva

One-element arrays are being deprecated[1]. Replace the one-element
array with a simple value type 'u32 reserved2'[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/tg3-20200718.md
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
 drivers/net/ethernet/broadcom/tg3.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/tg3.h b/drivers/net/ethernet/broadcom/tg3.h
index 6953d0546acb..1000c894064f 100644
--- a/drivers/net/ethernet/broadcom/tg3.h
+++ b/drivers/net/ethernet/broadcom/tg3.h
@@ -2847,7 +2847,7 @@ struct tg3_ocir {
 	u32				port1_flags;
 	u32				port2_flags;
 	u32				port3_flags;
-	u32				reserved2[1];
+	u32				reserved2;
 };
 
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH][next] tg3: Avoid the use of one-element array
  2020-07-22 18:43 [PATCH][next] tg3: Avoid the use of one-element array Gustavo A. R. Silva
@ 2020-07-22 18:55 ` Michael Chan
  2020-07-23  1:11 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Chan @ 2020-07-22 18:55 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Siva Reddy Kallam, Prashant Sreedharan, Michael Chan,
	David S. Miller, Jakub Kicinski, Netdev, open list

On Wed, Jul 22, 2020 at 11:38 AM Gustavo A. R. Silva
<gustavoars@kernel.org> wrote:
>
> One-element arrays are being deprecated[1]. Replace the one-element
> array with a simple value type 'u32 reserved2'[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/tg3-20200718.md
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Reviewed-by: Michael Chan <michael.chan@broadcom.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][next] tg3: Avoid the use of one-element array
  2020-07-22 18:43 [PATCH][next] tg3: Avoid the use of one-element array Gustavo A. R. Silva
  2020-07-22 18:55 ` Michael Chan
@ 2020-07-23  1:11 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-07-23  1:11 UTC (permalink / raw)
  To: gustavoars; +Cc: siva.kallam, prashant, mchan, kuba, netdev, linux-kernel

From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Date: Wed, 22 Jul 2020 13:43:58 -0500

> One-element arrays are being deprecated[1]. Replace the one-element
> array with a simple value type 'u32 reserved2'[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/tg3-20200718.md
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>

Applied, thank you.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-23  1:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22 18:43 [PATCH][next] tg3: Avoid the use of one-element array Gustavo A. R. Silva
2020-07-22 18:55 ` Michael Chan
2020-07-23  1:11 ` 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).