diff options
author | Su Hui <[email protected]> | 2023-08-31 15:34:56 +0800 |
---|---|---|
committer | Rafael J. Wysocki <[email protected]> | 2023-09-21 20:51:27 +0200 |
commit | 83f5ad58daf1576640bec3aa2f81f003f8e6c48b (patch) | |
tree | 9a7033739e3fca7d6db31860060981af2f8b3e1c | |
parent | ce9ecca0238b140b88f43859b211c9fdfd8e5b70 (diff) |
ACPI: OSL: add __printf format attribute to acpi_os_vprintf()
With gcc and W=1 option to compile the kernel, warning occurs:
drivers/acpi/osl.c:156:2: error:
function ‘acpi_os_vprintf’ might be a candidate for ‘gnu_printf’
format attribute [-Werror=suggest-attribute=format].
Allow the compiler to recognize and check format strings is safer.
Signed-off-by: Su Hui <[email protected]>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <[email protected]>
-rw-r--r-- | drivers/acpi/osl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index f725813d0cce..357f1325485d 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c @@ -149,7 +149,7 @@ void acpi_os_printf(const char *fmt, ...) } EXPORT_SYMBOL(acpi_os_printf); -void acpi_os_vprintf(const char *fmt, va_list args) +void __printf(1, 0) acpi_os_vprintf(const char *fmt, va_list args) { static char buffer[512]; |