* drivers/acpi/nfit/core.c:2271:3-10: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
@ 2020-12-15 23:04 kernel test robot
2020-12-15 23:04 ` [PATCH] coccinelle: misc: fix flexible_array.cocci warnings kernel test robot
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2020-12-15 23:04 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 1332 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Denis Efremov <efremov@linux.com>
CC: Julia Lawall <Julia.Lawall@lip6.fr>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 148842c98a24e508aecb929718818fbf4c2a6ff3
commit: 7b36c1398fb63f9c38cc83dc75f143d2e5995062 coccinelle: misc: add flexible_array.cocci script
date: 2 months ago
:::::: branch date: 20 hours ago
:::::: commit date: 2 months ago
config: x86_64-randconfig-c002-20201215 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 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>
"coccinelle warnings: (new ones prefixed by >>)"
>> drivers/acpi/nfit/core.c:2271:3-10: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays)
drivers/acpi/nfit/core.c:2282:3-10: 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: 36139 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH] coccinelle: misc: fix flexible_array.cocci warnings 2020-12-15 23:04 drivers/acpi/nfit/core.c:2271:3-10: 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 @ 2020-12-15 23:04 ` kernel test robot 0 siblings, 0 replies; 2+ messages in thread From: kernel test robot @ 2020-12-15 23:04 UTC (permalink / raw) To: kbuild [-- Attachment #1: Type: text/plain, Size: 2194 bytes --] CC: kbuild-all(a)lists.01.org CC: linux-kernel(a)vger.kernel.org TO: Denis Efremov <efremov@linux.com> CC: Julia Lawall <Julia.Lawall@lip6.fr> CC: Dan Williams <dan.j.williams@intel.com> CC: Vishal Verma <vishal.l.verma@intel.com> CC: Dave Jiang <dave.jiang@intel.com> CC: Ira Weiny <ira.weiny@intel.com> CC: "Rafael J. Wysocki" <rjw@rjwysocki.net> CC: Len Brown <lenb@kernel.org> CC: linux-nvdimm(a)lists.01.org CC: linux-acpi(a)vger.kernel.org From: kernel test robot <lkp@intel.com> drivers/acpi/nfit/core.c:2271:3-10: WARNING use flexible-array member instead (https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays) drivers/acpi/nfit/core.c:2282:3-10: 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: 7b36c1398fb6 ("coccinelle: misc: add flexible_array.cocci script") CC: Denis Efremov <efremov@linux.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/torvalds/linux.git master head: 148842c98a24e508aecb929718818fbf4c2a6ff3 commit: 7b36c1398fb63f9c38cc83dc75f143d2e5995062 coccinelle: misc: add flexible_array.cocci script :::::: branch date: 20 hours ago :::::: commit date: 2 months ago Please take the patch only if it's a positive warning. Thanks! core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -2268,7 +2268,7 @@ struct nfit_set_info { u64 region_offset; u32 serial_number; u32 pad; - } mapping[0]; + } mapping[]; }; struct nfit_set_info2 { @@ -2279,7 +2279,7 @@ struct nfit_set_info2 { u16 manufacturing_date; u8 manufacturing_location; u8 reserved[31]; - } mapping[0]; + } mapping[]; }; static size_t sizeof_nfit_set_info(int num_mappings) ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-15 23:04 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-12-15 23:04 drivers/acpi/nfit/core.c:2271:3-10: 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 2020-12-15 23:04 ` [PATCH] coccinelle: misc: fix flexible_array.cocci warnings kernel test robot
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.