* [PATCH] acpi/nfit: fix application of sizeof to pointer
@ 2020-11-24 12:37 Tian Tao
0 siblings, 0 replies; only message in thread
From: Tian Tao @ 2020-11-24 12:37 UTC (permalink / raw)
To: dan.j.williams, vishal.l.verma, dave.jiang, ira.weiny, rjw, lenb
Cc: linux-acpi
fixed the coccinelle:
drivers/acpi/nfit/core.c:2271:3-10: WARNING use flexible-array member
instead.
drivers/acpi/nfit/core.c:2282:3-10: WARNING use flexible-array member
instead.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
drivers/acpi/nfit/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
index 4426082..c589371 100644
--- 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)
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-24 12:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24 12:37 [PATCH] acpi/nfit: fix application of sizeof to pointer Tian Tao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).