Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1287630 > unrolled thread

[PATCH] ARM: pxa: mark ezx structures as __maybe_unused

Started byArnd Bergmann <arnd@arndb.de>
First post2015-12-09 17:40 +0100
Last post2015-12-09 22:30 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ARM: pxa: mark ezx structures as __maybe_unused Arnd Bergmann <arnd@arndb.de> - 2015-12-09 17:40 +0100
    Re: [PATCH] ARM: pxa: mark ezx structures as __maybe_unused Robert Jarzmik <robert.jarzmik@free.fr> - 2015-12-09 21:50 +0100
      Re: [PATCH] ARM: pxa: mark ezx structures as __maybe_unused Arnd Bergmann <arnd@arndb.de> - 2015-12-09 22:30 +0100

#1287630 — [PATCH] ARM: pxa: mark ezx structures as __maybe_unused

FromArnd Bergmann <arnd@arndb.de>
Date2015-12-09 17:40 +0100
Subject[PATCH] ARM: pxa: mark ezx structures as __maybe_unused
Message-ID<qDPWx-2lU-11@gated-at.bofh.it>
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>

diff --git a/arch/arm/mach-pxa/ezx.c b/arch/arm/mach-pxa/ezx.c
index b61b7971b54f..391ba898b971 100644
--- a/arch/arm/mach-pxa/ezx.c
+++ b/arch/arm/mach-pxa/ezx.c
@@ -50,7 +50,7 @@
 #define GPIO19_GEN1_CAM_RST		19
 #define GPIO28_GEN2_CAM_RST		28
 
-static struct pwm_lookup ezx_pwm_lookup[] = {
+static struct pwm_lookup ezx_pwm_lookup[] __maybe_unused = {
 	PWM_LOOKUP("pxa27x-pwm.0", 0, "pwm-backlight.0", NULL, 78700,
 		   PWM_POLARITY_NORMAL),
 };
@@ -83,7 +83,7 @@ static struct pxafb_mode_info mode_ezx_old = {
 	.sync			= 0,
 };
 
-static struct pxafb_mach_info ezx_fb_info_1 = {
+static struct pxafb_mach_info ezx_fb_info_1 __maybe_unused = {
 	.modes		= &mode_ezx_old,
 	.num_modes	= 1,
 	.lcd_conn	= LCD_COLOR_TFT_16BPP,
@@ -104,17 +104,17 @@ static struct pxafb_mode_info mode_72r89803y01 = {
 	.sync			= 0,
 };
 
-static struct pxafb_mach_info ezx_fb_info_2 = {
+static struct pxafb_mach_info ezx_fb_info_2 __maybe_unused = {
 	.modes		= &mode_72r89803y01,
 	.num_modes	= 1,
 	.lcd_conn	= LCD_COLOR_TFT_18BPP,
 };
 
-static struct platform_device *ezx_devices[] __initdata = {
+static struct platform_device *ezx_devices[] __initdata __maybe_unused = {
 	&ezx_backlight_device,
 };
 
-static unsigned long ezx_pin_config[] __initdata = {
+static unsigned long ezx_pin_config[] __initdata __maybe_unused = {
 	/* PWM backlight */
 	GPIO16_PWM0_OUT,
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1287842

FromRobert Jarzmik <robert.jarzmik@free.fr>
Date2015-12-09 21:50 +0100
Message-ID<qDTQu-4PM-31@gated-at.bofh.it>
In reply to#1287630
Arnd Bergmann <arnd@arndb.de> writes:

> 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>

I think you'll take that through your tree, as I'm passing the v4.5 pull. If you
want me to take them, just tell me, but I think v4.5 is already prepared on your
side as I've seen a mail from Boris talking about pxa patches going through mtd
tree for v4.5.

Cheers.

--
Robert
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1287874

FromArnd Bergmann <arnd@arndb.de>
Date2015-12-09 22:30 +0100
Message-ID<qDUtd-5ih-17@gated-at.bofh.it>
In reply to#1287842
On Wednesday 09 December 2015 21:46:30 Robert Jarzmik wrote:
> Arnd Bergmann <arnd@arndb.de> writes:
> 
> > 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>
> 
> I think you'll take that through your tree, as I'm passing the v4.5 pull. If you
> want me to take them, just tell me, but I think v4.5 is already prepared on your
> side as I've seen a mail from Boris talking about pxa patches going through mtd
> tree for v4.5.

I'll apply them directly, thanks for taking a look! I'm also aware of Boris
patches and don't expect a conflict here but will resolve it in arm-soc
otherwise.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web