From: Julia Lawall <julia.lawall@inria.fr>
To: Dan Williams <dan.j.williams@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
Ira Weiny <ira.weiny@intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>,
linux-nvdimm@lists.01.org
Cc: linux-acpi@vger.kernel.org, Denis Efremov <efremov@linux.com>,
kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ACPI: NFIT: fix flexible_array.cocci warnings
Date: Tue, 22 Dec 2020 22:09:18 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2012222207060.2723@hadrien> (raw)
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: 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>
Signed-off-by: Julia Lawall <julia.lawall@inria.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
:::::: branch date: 20 hours ago
:::::: commit date: 2 months ago
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)
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
next reply other threads:[~2020-12-22 21:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-22 21:09 Julia Lawall [this message]
2020-12-24 18:12 ` [PATCH] ACPI: NFIT: fix flexible_array.cocci warnings Dan Williams
-- strict thread matches above, loose matches on Subject: below --
2021-01-05 21:03 [PATCH] ACPI: NFIT: Fix " Dan Williams
2021-01-05 21:28 ` Verma, Vishal L
2021-01-05 21:51 ` Dan Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.22.394.2012222207060.2723@hadrien \
--to=julia.lawall@inria.fr \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=efremov@linux.com \
--cc=ira.weiny@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvdimm@lists.01.org \
--cc=rjw@rjwysocki.net \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox