All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: dsa: felix: fix flexible_array.cocci warnings
@ 2021-11-25 17:17 kernel test robot
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-11-25 17:17 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 1971 bytes --]

CC: kbuild-all(a)lists.01.org
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
CC: Vladimir Oltean <vladimir.oltean@nxp.com>
CC: Claudiu Manoil <claudiu.manoil@nxp.com>
CC: Alexandre Belloni <alexandre.belloni@bootlin.com>
CC: UNGLinuxDriver(a)microchip.com
CC: Andrew Lunn <andrew@lunn.ch>
CC: Vivien Didelot <vivien.didelot@gmail.com>
CC: Florian Fainelli <f.fainelli@gmail.com>
CC: Jakub Kicinski <kuba@kernel.org>
CC: netdev(a)vger.kernel.org

From: kernel test robot <lkp@intel.com>

drivers/net/dsa/ocelot/felix_vsc9959.c:1388:26-33: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)


 Zero-length and one-element arrays are deprecated, see
 Documentation/process/deprecated.rst
 Flexible-array members should be used instead.

Generated by: scripts/coccinelle/misc/flexible_array.cocci

Fixes: 23ae3a787771 ("net: dsa: felix: add stream gate settings for psfp")
CC: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   f81e94e91878bded599cc60f2881cfd50991aeb9
commit: 23ae3a7877718931474684ef4fbbaf1d1511ee84 [2018/3632] net: dsa: felix: add stream gate settings for psfp
:::::: branch date: 12 hours ago
:::::: commit date: 7 days ago

Please take the patch only if it's a positive warning. Thanks!

 felix_vsc9959.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -1385,7 +1385,7 @@ struct felix_stream_gate {
 	u64 cycletime;
 	u64 cycletime_ext;
 	u32 num_entries;
-	struct action_gate_entry entries[0];
+	struct action_gate_entry entries[];
 };
 
 struct felix_stream_gate_entry {

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

* [PATCH] net: dsa: felix: fix flexible_array.cocci warnings
@ 2021-11-27 18:03 ` Julia Lawall
  0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2021-11-27 18:03 UTC (permalink / raw)
  To: Xiaoliang Yang
  Cc: kbuild-all, Linux Memory Management List, Vladimir Oltean,
	Claudiu Manoil, Alexandre Belloni, UNGLinuxDriver, Andrew Lunn,
	Vivien Didelot, Florian Fainelli, Jakub Kicinski, netdev

From: kernel test robot <lkp@intel.com>

Zero-length and one-element arrays are deprecated, see
Documentation/process/deprecated.rst
Flexible-array members should be used instead.

Generated by: scripts/coccinelle/misc/flexible_array.cocci

Fixes: 23ae3a787771 ("net: dsa: felix: add stream gate settings for psfp")
CC: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   f81e94e91878bded599cc60f2881cfd50991aeb9
commit: 23ae3a7877718931474684ef4fbbaf1d1511ee84 [2018/3632] net: dsa: felix: add stream gate settings for psfp
:::::: branch date: 12 hours ago
:::::: commit date: 7 days ago

 felix_vsc9959.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -1385,7 +1385,7 @@ struct felix_stream_gate {
 	u64 cycletime;
 	u64 cycletime_ext;
 	u32 num_entries;
-	struct action_gate_entry entries[0];
+	struct action_gate_entry entries[];
 };

 struct felix_stream_gate_entry {

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

* [PATCH] net: dsa: felix: fix flexible_array.cocci warnings
@ 2021-11-27 18:03 ` Julia Lawall
  0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2021-11-27 18:03 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1244 bytes --]

From: kernel test robot <lkp@intel.com>

Zero-length and one-element arrays are deprecated, see
Documentation/process/deprecated.rst
Flexible-array members should be used instead.

Generated by: scripts/coccinelle/misc/flexible_array.cocci

Fixes: 23ae3a787771 ("net: dsa: felix: add stream gate settings for psfp")
CC: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   f81e94e91878bded599cc60f2881cfd50991aeb9
commit: 23ae3a7877718931474684ef4fbbaf1d1511ee84 [2018/3632] net: dsa: felix: add stream gate settings for psfp
:::::: branch date: 12 hours ago
:::::: commit date: 7 days ago

 felix_vsc9959.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -1385,7 +1385,7 @@ struct felix_stream_gate {
 	u64 cycletime;
 	u64 cycletime_ext;
 	u32 num_entries;
-	struct action_gate_entry entries[0];
+	struct action_gate_entry entries[];
 };

 struct felix_stream_gate_entry {

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

end of thread, other threads:[~2021-11-27 18:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-25 17:17 [PATCH] net: dsa: felix: fix flexible_array.cocci warnings kernel test robot
2021-11-27 18:03 Julia Lawall
2021-11-27 18:03 ` Julia Lawall

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.