]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: pxa: mark unused eseries code as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Fri, 29 Jan 2016 14:06:27 +0000 (15:06 +0100)
committerRobert Jarzmik <robert.jarzmik@free.fr>
Mon, 1 Feb 2016 20:44:12 +0000 (21:44 +0100)
Two variables in eseries.c are used on multiple platforms,
but are not referenced when those are all disabled:

eseries.c:60:31: warning: 'e7xx_gpio_vbus' defined but not used [-Wunused-variable]
eseries.c:129:20: warning: 'eseries_register_clks' defined but not used [-Wunused-function]

Marking them __maybe_unused is the nicest way to ensure
that we never get the warning or end up with missing symbols
if we get it wrong.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
arch/arm/mach-pxa/eseries.c

index 0b00b226f54bc3eb7c343b05b133c3a4e08072ce..e838b11fb8c7d3992f88d247522064a83e2ea08f 100644 (file)
@@ -57,7 +57,7 @@ struct gpio_vbus_mach_info e7xx_udc_info = {
        .gpio_pullup_inverted = 1
 };
 
-static struct platform_device e7xx_gpio_vbus = {
+static struct platform_device e7xx_gpio_vbus __maybe_unused = {
        .name   = "gpio-vbus",
        .id     = -1,
        .dev    = {
@@ -126,7 +126,7 @@ struct resource eseries_tmio_resources[] = {
 };
 
 /* Some e-series hardware cannot control the 32K clock */
-static void __init eseries_register_clks(void)
+static void __init __maybe_unused eseries_register_clks(void)
 {
        clk_register_fixed_rate(NULL, "CLK_CK32K", NULL, CLK_IS_ROOT, 32768);
 }