ACPI: tables: Remove incorrect __nonstring attribute from table_sigs
PATCH 1/1 ACPI: tables: Remove incorrect __nonstring attribute from table_sigs
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 <[email protected]>
--- drivers/acpi/tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/tables.c +1 -1
@@ -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 ,
Signature · 1 line
2.43.0