Skip to content

Commit 6e3a475

Browse files
xry111rafaeljw
authored andcommitted
ACPICA: Work around bogus -Wstringop-overread warning since GCC 11
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/899f2dec-e8b9-44f4-ab8d-001e160a2aed@roeck-us.net/ Link: acpica/acpica@abf5b573 Link: https://gcc.gnu.org/PR122073 [1] Co-developed-by: Saket Dumbre <saket.dumbre@intel.com> Signed-off-by: Saket Dumbre <saket.dumbre@intel.com> Signed-off-by: Xi Ruoyao <xry111@xry111.site> Acked-by: Huacai Chen <chenhuacai@loongson.cn> Cc: All applicable <stable@vger.kernel.org> [ rjw: Subject and changelog edits ] Link: https://patch.msgid.link/20251021092825.822007-1-xry111@xry111.site Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 211ddde commit 6e3a475

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

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 */
@@ -143,4 +148,5 @@ acpi_tb_print_table_header(acpi_physical_address address,
143148
local_header.asl_compiler_id,
144149
local_header.asl_compiler_revision));
145150
}
151+
#pragma GCC diagnostic pop
146152
}

0 commit comments

Comments
 (0)