diff mbox series

ACPI: tables: Remove incorrect __nonstring attribute from table_sigs

Message ID 20250421190444.163923-1-shaikhkamal2012@gmail.com
State New
Headers show
Series ACPI: tables: Remove incorrect __nonstring attribute from table_sigs | expand

Commit Message

shaikh.kamal April 21, 2025, 7:04 p.m. UTC
The table_sigs array is declared as a 2D char array with a fixed size
(ACPI_NAMESEG_SIZE, which is 4). The use of the __nonstring attribute
here is unnecessary and triggers a compiler warning:

  warning: ‘nonstring’ attribute ignored on objects of type ‘const char[][4]’

Since GCC ignores this attribute on such declarations, and it causes
a build failure due to -Werror, remove __nonstring to fix the issue.

Signed-off-by: shaikh.kamal <shaikhkamal2012@gmail.com>
---
 drivers/acpi/tables.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index b5205d464a8a..2295abbecd14 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -396,7 +396,7 @@  static u8 __init acpi_table_checksum(u8 *buffer, u32 length)
 }
 
 /* All but ACPI_SIG_RSDP and ACPI_SIG_FACS: */
-static const char table_sigs[][ACPI_NAMESEG_SIZE] __initconst __nonstring = {
+static const char table_sigs[][ACPI_NAMESEG_SIZE] __initconst = {
 	ACPI_SIG_BERT, ACPI_SIG_BGRT, ACPI_SIG_CPEP, ACPI_SIG_ECDT,
 	ACPI_SIG_EINJ, ACPI_SIG_ERST, ACPI_SIG_HEST, ACPI_SIG_MADT,
 	ACPI_SIG_MSCT, ACPI_SIG_SBST, ACPI_SIG_SLIT, ACPI_SIG_SRAT,