diff options
author | Mathieu Malaterre <malat@debian.org> | 2018-03-10 13:06:45 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-15 12:42:55 -0400 |
commit | 219c7b06f3da9ac2b51ed671881b20f1b127daef (patch) | |
tree | cea1131aa6eff4d640b3642b9ffd56ce9f337764 | |
parent | 7d8f68619e4f530e19c17e7c0d04f0a791891a77 (diff) |
powerpc: Mark the variable earlycon_acpi_spcr_enable maybe_unused
Re-use the object-like macro EARLYCON_USED_OR_UNUSED to mark
`earlycon_acpi_spcr_enable` as maybe_unused.
Fix the following warning (treated as error in W=1)
CC arch/powerpc/kernel/setup-common.o
In file included from ./include/linux/serial_8250.h:14:0,
from arch/powerpc/kernel/setup-common.c:33:
./include/linux/serial_core.h:382:19: error: ‘earlycon_acpi_spcr_enable’ defined but not used [-Werror=unused-const-variable=]
static const bool earlycon_acpi_spcr_enable;
^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Signed-off-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | include/linux/serial_core.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index b32df49a3bd5..1d356105f25a 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -379,7 +379,7 @@ extern int of_setup_earlycon(const struct earlycon_id *match, | |||
379 | extern bool earlycon_acpi_spcr_enable __initdata; | 379 | extern bool earlycon_acpi_spcr_enable __initdata; |
380 | int setup_earlycon(char *buf); | 380 | int setup_earlycon(char *buf); |
381 | #else | 381 | #else |
382 | static const bool earlycon_acpi_spcr_enable; | 382 | static const bool earlycon_acpi_spcr_enable EARLYCON_USED_OR_UNUSED; |
383 | static inline int setup_earlycon(char *buf) { return 0; } | 383 | static inline int setup_earlycon(char *buf) { return 0; } |
384 | #endif | 384 | #endif |
385 | 385 | ||