Skip to content

Commit 9506b5f

Browse files
xry111gregkh
authored andcommitted
ACPICA: Work around bogus -Wstringop-overread warning since GCC 11
commit 6e3a475 upstream. When ACPI_MISALIGNMENT_NOT_SUPPORTED is set, GCC can produce a bogus -Wstringop-overread warning, see [1]. To me, it's very clear that we have a compiler bug here, thus just disable the warning. Fixes: a9d1343 ("LoongArch: Align ACPI structures if ARCH_STRICT_ALIGN enabled") Link: https://lore.kernel.org/all/[email protected]/ Link: acpica/acpica@abf5b573 Link: https://gcc.gnu.org/PR122073 [1] Co-developed-by: Saket Dumbre <[email protected]> Signed-off-by: Saket Dumbre <[email protected]> Signed-off-by: Xi Ruoyao <[email protected]> Acked-by: Huacai Chen <[email protected]> Cc: All applicable <[email protected]> [ rjw: Subject and changelog edits ] Link: https://patch.msgid.link/[email protected] Signed-off-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 28e1216 commit 9506b5f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/acpi/acpica/tbprint.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ acpi_tb_print_table_header(acpi_physical_address address,
9595
{
9696
struct acpi_table_header local_header;
9797

98+
#pragma GCC diagnostic push
99+
#if defined(__GNUC__) && __GNUC__ >= 11
100+
#pragma GCC diagnostic ignored "-Wstringop-overread"
101+
#endif
102+
98103
if (ACPI_COMPARE_NAMESEG(header->signature, ACPI_SIG_FACS)) {
99104

100105
/* FACS only has signature and length fields */
@@ -135,4 +140,5 @@ acpi_tb_print_table_header(acpi_physical_address address,
135140
local_header.asl_compiler_id,
136141
local_header.asl_compiler_revision));
137142
}
143+
#pragma GCC diagnostic pop
138144
}

0 commit comments

Comments
 (0)