diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-03-05 19:41:44 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-03-08 19:10:30 +0100 |
commit | 4c324548f09fec413b4ee589174dabacfe17d953 (patch) | |
tree | 43db312324b6fccc184402a163c06debbec484a9 /include/linux/acpi.h | |
parent | a030fee8db446aaf928c9c0960a21e319886ffdc (diff) | |
download | lwn-4c324548f09fec413b4ee589174dabacfe17d953.tar.gz lwn-4c324548f09fec413b4ee589174dabacfe17d953.zip |
ACPI: utils: Introduce acpi_evaluation_failure_warn()
Quite a few users of ACPI objects want to log a warning message if
the evaluation fails which is a repeating pattern, so introduce a
helper function for that purpose and convert some code where it is
open-coded to using it.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r-- | include/linux/acpi.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 9f432411e988..35aa70defc57 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1027,9 +1027,14 @@ static inline void acpi_ec_set_gpe_wake_mask(u8 action) {} __printf(3, 4) void acpi_handle_printk(const char *level, acpi_handle handle, const char *fmt, ...); +void acpi_evaluation_failure_warn(acpi_handle handle, const char *name, + acpi_status status); #else /* !CONFIG_ACPI */ static inline __printf(3, 4) void acpi_handle_printk(const char *level, void *handle, const char *fmt, ...) {} +static inline void acpi_evaluation_failure_warn(acpi_handle handle, + const char *name, + acpi_status status) {} #endif /* !CONFIG_ACPI */ #if defined(CONFIG_ACPI) && defined(CONFIG_DYNAMIC_DEBUG) |