summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKees Cook <kees@kernel.org>2025-05-29 11:18:37 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-20 18:30:27 +0200
commitd1b0d93bfcaaef13327ed5703ea7cb2a1b0678d7 (patch)
treeed32e3e780a49adefc320dbe0bed9182834a7475
parented2089fe9359345b1583ccf5697ff3b0fbcccfad (diff)
platform/x86: thinkpad_acpi: Handle KCOV __init vs inline mismatches
[ Upstream commit 6418a8504187dc7f5b6f9d0649c03e362cb0664b ] When KCOV is enabled all functions get instrumented, unless the __no_sanitize_coverage attribute is used. To prepare for __no_sanitize_coverage being applied to __init functions[1], we have to handle differences in how GCC's inline optimizations get resolved. For thinkpad_acpi routines, this means forcing two functions to be inline with __always_inline. Link: https://lore.kernel.org/lkml/20250523043935.2009972-11-kees@kernel.org/ [1] Signed-off-by: Kees Cook <kees@kernel.org> Link: https://lore.kernel.org/r/20250529181831.work.439-kees@kernel.org Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 0528af4ed8d6..2c67d9758e6b 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -561,12 +561,12 @@ static unsigned long __init tpacpi_check_quirks(
return 0;
}
-static inline bool __pure __init tpacpi_is_lenovo(void)
+static __always_inline bool __pure __init tpacpi_is_lenovo(void)
{
return thinkpad_id.vendor == PCI_VENDOR_ID_LENOVO;
}
-static inline bool __pure __init tpacpi_is_ibm(void)
+static __always_inline bool __pure __init tpacpi_is_ibm(void)
{
return thinkpad_id.vendor == PCI_VENDOR_ID_IBM;
}