From: Wyes Karny <wyes.karny@amd.com>
To: <rafael@kernel.org>, <lenb@kernel.org>, <robert.moore@intel.com>,
<keescook@chromium.org>
Cc: <linux-acpi@vger.kernel.org>,
<acpica-devel@lists.linuxfoundation.org>,
<linux-kernel@vger.kernel.org>, Wyes Karny <wyes.karny@amd.com>
Subject: [PATCH] acpi: Replace struct acpi_table_slit 1-element array with flex-array
Date: Tue, 23 May 2023 16:18:15 +0000 [thread overview]
Message-ID: <20230523161815.3083-1-wyes.karny@amd.com> (raw)
struct acpi_table_slit is used for copying System Locality Information
Table data from ACPI tables. Here `entry` is a flex array but it was
using ancient 1-element fake flexible array, which has been deprecated.
Replace it with a C99 flexible array.
Signed-off-by: Wyes Karny <wyes.karny@amd.com>
---
include/acpi/actbl3.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h
index f51c46f4e3e4..000764ab3985 100644
--- a/include/acpi/actbl3.h
+++ b/include/acpi/actbl3.h
@@ -86,7 +86,7 @@ struct acpi_table_slic {
struct acpi_table_slit {
struct acpi_table_header header; /* Common ACPI table header */
u64 locality_count;
- u8 entry[1]; /* Real size = localities^2 */
+ u8 entry[]; /* Real size = localities^2 */
};
/*******************************************************************************
--
2.34.1
next reply other threads:[~2023-05-23 16:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-23 16:18 Wyes Karny [this message]
2023-05-23 16:44 ` [PATCH] acpi: Replace struct acpi_table_slit 1-element array with flex-array Kees Cook
2023-06-01 16:56 ` Kees Cook
2023-06-01 18:21 ` Rafael J. Wysocki
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=20230523161815.3083-1-wyes.karny@amd.com \
--to=wyes.karny@amd.com \
--cc=acpica-devel@lists.linuxfoundation.org \
--cc=keescook@chromium.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=robert.moore@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