Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: pxa: mark ezx structures as __maybe_unused

The ezx platform contains multiple machine descriptors, but not all
of them use all of the data structures, and it's possible to disable
all of the machines, which produces some harmless warnings:

mach-pxa/ezx.c:53:26: warning: 'ezx_pwm_lookup' defined but not used [-Wunused-variable]
mach-pxa/ezx.c:86:31: warning: 'ezx_fb_info_1' defined but not used [-Wunused-variable]
mach-pxa/ezx.c:107:31: warning: 'ezx_fb_info_2' defined but not used [-Wunused-variable]
mach-pxa/ezx.c:113:32: warning: 'ezx_devices' defined but not used [-Wunused-variable]
mach-pxa/ezx.c:117:22: warning: 'ezx_pin_config' defined but not used [-Wunused-variable]

This marks all those structures as __maybe_unused to avoid the warnings.
Obviously a configuration that contains the ezx platform but no specific
model is a bit silly, but it should not cause compile-time warnings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>

+5 -5
+5 -5
arch/arm/mach-pxa/ezx.c
··· 50 50 #define GPIO19_GEN1_CAM_RST 19 51 51 #define GPIO28_GEN2_CAM_RST 28 52 52 53 - static struct pwm_lookup ezx_pwm_lookup[] = { 53 + static struct pwm_lookup ezx_pwm_lookup[] __maybe_unused = { 54 54 PWM_LOOKUP("pxa27x-pwm.0", 0, "pwm-backlight.0", NULL, 78700, 55 55 PWM_POLARITY_NORMAL), 56 56 }; ··· 83 83 .sync = 0, 84 84 }; 85 85 86 - static struct pxafb_mach_info ezx_fb_info_1 = { 86 + static struct pxafb_mach_info ezx_fb_info_1 __maybe_unused = { 87 87 .modes = &mode_ezx_old, 88 88 .num_modes = 1, 89 89 .lcd_conn = LCD_COLOR_TFT_16BPP, ··· 104 104 .sync = 0, 105 105 }; 106 106 107 - static struct pxafb_mach_info ezx_fb_info_2 = { 107 + static struct pxafb_mach_info ezx_fb_info_2 __maybe_unused = { 108 108 .modes = &mode_72r89803y01, 109 109 .num_modes = 1, 110 110 .lcd_conn = LCD_COLOR_TFT_18BPP, 111 111 }; 112 112 113 - static struct platform_device *ezx_devices[] __initdata = { 113 + static struct platform_device *ezx_devices[] __initdata __maybe_unused = { 114 114 &ezx_backlight_device, 115 115 }; 116 116 117 - static unsigned long ezx_pin_config[] __initdata = { 117 + static unsigned long ezx_pin_config[] __initdata __maybe_unused = { 118 118 /* PWM backlight */ 119 119 GPIO16_PWM0_OUT, 120 120