All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][next] fddi/skfp: Avoid the use of one-element array
@ 2020-09-29 13:27 Gustavo A. R. Silva
  2020-09-29 20:28 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2020-09-29 13:27 UTC (permalink / raw)
  To: 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 object of type u_char: 'u_char rm_pad1'[2], once it seems
this is just a placeholder for padding.

[1] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays
[2] https://github.com/KSPP/linux/issues/86

Built-tested-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/lkml/5f72c23f.%2FkPBWcZBu+W6HKH4%25lkp@intel.com/
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
---
 drivers/net/fddi/skfp/h/smc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/fddi/skfp/h/smc.h b/drivers/net/fddi/skfp/h/smc.h
index 991857f6a83c..706fa619b703 100644
--- a/drivers/net/fddi/skfp/h/smc.h
+++ b/drivers/net/fddi/skfp/h/smc.h
@@ -122,7 +122,7 @@ struct s_rmt {
 	u_char timer1_exp ;		/* flag : timer 1 expired */
 	u_char timer2_exp ;		/* flag : timer 2 expired */
 
-	u_char rm_pad1[1] ;
+	u_char rm_pad1;
 } ;
 
 /*
-- 
2.27.0


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

* Re: [PATCH][next] fddi/skfp: Avoid the use of one-element array
  2020-09-29 13:27 [PATCH][next] fddi/skfp: Avoid the use of one-element array Gustavo A. R. Silva
@ 2020-09-29 20:28 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-09-29 20:28 UTC (permalink / raw)
  To: gustavoars; +Cc: kuba, netdev, linux-kernel

From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
Date: Tue, 29 Sep 2020 08:27:51 -0500

> One-element arrays are being deprecated[1]. Replace the one-element array
> with a simple object of type u_char: 'u_char rm_pad1'[2], once it seems
> this is just a placeholder for padding.
> 
> [1] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arrays
> [2] https://github.com/KSPP/linux/issues/86
> 
> Built-tested-by: kernel test robot <lkp@intel.com>
> Link: https://lore.kernel.org/lkml/5f72c23f.%2FkPBWcZBu+W6HKH4%25lkp@intel.com/
> 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-09-29 20:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 13:27 [PATCH][next] fddi/skfp: Avoid the use of one-element array Gustavo A. R. Silva
2020-09-29 20:28 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.