[lkml]   [2018]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 03/21] 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 <>
include/linux/serial_core.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index b32df49a3bd5..4d14ecd7dbe8 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -379,6 +379,7 @@ extern int of_setup_earlycon(const struct earlycon_id *match,
extern bool earlycon_acpi_spcr_enable __initdata;
int setup_earlycon(char *buf);
static const bool earlycon_acpi_spcr_enable;
static inline int setup_earlycon(char *buf) { return 0; }
 \ /
  Last update: 2018-02-25 18:26    [W:0.444 / U:0.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site