From: Mathieu Malaterre Date: Sat, 10 Mar 2018 18:06:45 +0000 (+0100) Subject: powerpc: Mark the variable earlycon_acpi_spcr_enable maybe_unused X-Git-Tag: v4.19~1303^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=219c7b06f3da9ac2b51ed671881b20f1b127daef;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index b32df49..1d35610 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, extern bool earlycon_acpi_spcr_enable __initdata; int setup_earlycon(char *buf); #else -static const bool earlycon_acpi_spcr_enable; +static const bool earlycon_acpi_spcr_enable EARLYCON_USED_OR_UNUSED; static inline int setup_earlycon(char *buf) { return 0; } #endif