All of lore.kernel.org
 help / color / mirror / Atom feed
* [lee-linaro:aosp-android-mainline-tracking 307/599] drivers/hid/hid-nintendo.c:155:4-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
@ 2021-05-13 16:00 kernel test robot
  2021-05-13 16:00 ` [PATCH] FROMLIST: HID: nintendo: fix flexible_array.cocci warnings kernel test robot
  0 siblings, 1 reply; 6+ messages in thread
From: kernel test robot @ 2021-05-13 16:00 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
TO: Lee Jones <lee.jones@linaro.org>

tree:   https://git.linaro.org/people/lee.jones/linux.git aosp-android-mainline-tracking
head:   9b2a8deb96b1f9d4cc52497c4559f187db0408e1
commit: f4dc6237a840e52e0ecd3c46393af5b98029f650 [307/599] FROMLIST: HID: nintendo: add nintendo switch controller driver
:::::: branch date: 5 hours ago
:::::: commit date: 5 hours ago
config: powerpc64-randconfig-c024-20210513 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


cocci warnings: (new ones prefixed by >>)
>> drivers/hid/hid-nintendo.c:155:4-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
   drivers/hid/hid-nintendo.c:161:4-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 28089 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH] FROMLIST: HID: nintendo: fix flexible_array.cocci warnings
@ 2021-05-14 12:44 Julia Lawall
  2021-05-14 14:04 ` Lee Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Julia Lawall @ 2021-05-14 12:44 UTC (permalink / raw)
  To: kbuild-all

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

 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: f4dc6237a840 ("FROMLIST: HID: nintendo: add nintendo switch controller driver")
CC: Daniel J. Ogorchock <djogorchock@gmail.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.linaro.org/people/lee.jones/linux.git aosp-android-mainline-tracking
head:   9b2a8deb96b1f9d4cc52497c4559f187db0408e1
commit: f4dc6237a840e52e0ecd3c46393af5b98029f650 [307/599] FROMLIST: HID: nintendo: add nintendo switch controller driver
:::::: branch date: 5 hours ago
:::::: commit date: 5 hours ago

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

 hid-nintendo.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/hid/hid-nintendo.c
+++ b/drivers/hid/hid-nintendo.c
@@ -152,13 +152,13 @@ struct joycon_subcmd_request {
 	u8 packet_num; /* incremented every send */
 	u8 rumble_data[8];
 	u8 subcmd_id;
-	u8 data[0]; /* length depends on the subcommand */
+	u8 data[]; /* length depends on the subcommand */
 } __packed;

 struct joycon_subcmd_reply {
 	u8 ack; /* MSB 1 for ACK, 0 for NACK */
 	u8 id; /* id of requested subcmd */
-	u8 data[0]; /* will be at most 35 bytes */
+	u8 data[]; /* will be at most 35 bytes */
 } __packed;

 struct joycon_input_report {

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

end of thread, other threads:[~2021-05-14 15:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-13 16:00 [lee-linaro:aosp-android-mainline-tracking 307/599] drivers/hid/hid-nintendo.c:155:4-8: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) kernel test robot
2021-05-13 16:00 ` [PATCH] FROMLIST: HID: nintendo: fix flexible_array.cocci warnings kernel test robot
2021-05-14 12:44 Julia Lawall
2021-05-14 14:04 ` Lee Jones
2021-05-14 14:40   ` Julia Lawall
2021-05-14 15:27     ` Chen, Rong A

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.