From: Tony Lindgren <tony@atomide.com>
To: Felipe Balbi <felipe.balbi@nokia.com>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [patch-v2.6.33-rc2+ 10/12] arm: omap: gpio: kill compile warning in gpio.c
Date: Tue, 5 Jan 2010 12:20:16 -0800 [thread overview]
Message-ID: <20100105202016.GA14533@atomide.com> (raw)
In-Reply-To: <1262127092-14878-11-git-send-email-felipe.balbi@nokia.com>
[-- Attachment #1: Type: text/plain, Size: 1035 bytes --]
* Felipe Balbi <felipe.balbi@nokia.com> [091229 14:59]:
> when building linux-omap for omap1510, there will
> be a compile warning about the unused flags variable
> which is only used on 16xx and onwards.
>
> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
> ---
> arch/arm/plat-omap/gpio.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
> index 0484681..8c34b81 100644
> --- a/arch/arm/plat-omap/gpio.c
> +++ b/arch/arm/plat-omap/gpio.c
> @@ -1072,7 +1072,10 @@ static inline void _set_gpio_irqenable(struct gpio_bank *bank, int gpio, int ena
> */
> static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
> {
> +#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP24XX) || \
> + defined(CONFIG_ARCH_OMAP34XX) || defined(CONFIG_ARCH_OMAP4)
> unsigned long flags;
> +#endif
>
Let's not add more ifdeffery to gpio.c.. How about
let's use uninitialized_var() instead? See the patch
below.
Regards,
Tony
[-- Attachment #2: uninitialized-var.patch --]
[-- Type: text/x-diff, Size: 758 bytes --]
>From 62fc4a4ec588956979ef611da8753d8d1c02de8e Mon Sep 17 00:00:00 2001
From: Tony Lindgren <tony@atomide.com>
Date: Tue, 5 Jan 2010 12:17:06 -0800
Subject: [PATCH] omap: Remove uninitialized warning for gpio.c
Flags is not used on 15xx.
Signed-off-by: Tony Lindgren <tony@atomide.com>
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index 0484681..792be9f 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -1072,7 +1072,7 @@ static inline void _set_gpio_irqenable(struct gpio_bank *bank, int gpio, int ena
*/
static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
{
- unsigned long flags;
+ unsigned long uninitialized_var(flags);
switch (bank->method) {
#ifdef CONFIG_ARCH_OMAP16XX
WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [patch-v2.6.33-rc2+ 10/12] arm: omap: gpio: kill compile warning in gpio.c
Date: Tue, 5 Jan 2010 12:20:16 -0800 [thread overview]
Message-ID: <20100105202016.GA14533@atomide.com> (raw)
In-Reply-To: <1262127092-14878-11-git-send-email-felipe.balbi@nokia.com>
* Felipe Balbi <felipe.balbi@nokia.com> [091229 14:59]:
> when building linux-omap for omap1510, there will
> be a compile warning about the unused flags variable
> which is only used on 16xx and onwards.
>
> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
> ---
> arch/arm/plat-omap/gpio.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
> index 0484681..8c34b81 100644
> --- a/arch/arm/plat-omap/gpio.c
> +++ b/arch/arm/plat-omap/gpio.c
> @@ -1072,7 +1072,10 @@ static inline void _set_gpio_irqenable(struct gpio_bank *bank, int gpio, int ena
> */
> static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable)
> {
> +#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP24XX) || \
> + defined(CONFIG_ARCH_OMAP34XX) || defined(CONFIG_ARCH_OMAP4)
> unsigned long flags;
> +#endif
>
Let's not add more ifdeffery to gpio.c.. How about
let's use uninitialized_var() instead? See the patch
below.
Regards,
Tony
next prev parent reply other threads:[~2010-01-05 20:20 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-29 22:51 [patch-v2.6.33-rc2+ 00/12] arm omap patches for next -rc Felipe Balbi
2009-12-29 22:51 ` Felipe Balbi
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 01/12] arm: omap: musb: ioremap only what's ours Felipe Balbi
2009-12-29 22:51 ` Felipe Balbi
2009-12-29 23:51 ` Felipe Balbi
2009-12-29 23:51 ` Felipe Balbi
[not found] ` <1262127092-14878-1-git-send-email-felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 02/12] arm: omap: musb: fix board power budget by passing it to usb_musb_init Felipe Balbi
2009-12-29 22:51 ` Felipe Balbi
2009-12-30 11:13 ` Sergei Shtylyov
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 03/12] arm: omap: musb: fix board mode " Felipe Balbi
2009-12-29 22:51 ` Felipe Balbi
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 04/12] arm: omap1: mailbox: kill compile warning Felipe Balbi
2009-12-29 22:51 ` Felipe Balbi
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 05/12] arm: omap: gpmc: " Felipe Balbi
2009-12-29 22:51 ` Felipe Balbi
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 06/12] arm: omap: kill compile warning in irq.c Felipe Balbi
2009-12-29 22:51 ` Felipe Balbi
2010-01-05 20:20 ` Tony Lindgren
2010-01-05 20:20 ` Tony Lindgren
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 07/12] arm: omap: remove unused variables Felipe Balbi
2009-12-29 22:51 ` Felipe Balbi
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 08/12] arm: omap: io: kill compile warning Felipe Balbi
2009-12-29 22:51 ` Felipe Balbi
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 09/12] arm: omap: kill compile warning on board-4430-sdp.c Felipe Balbi
2009-12-29 22:51 ` Felipe Balbi
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 10/12] arm: omap: gpio: kill compile warning in gpio.c Felipe Balbi
2009-12-29 22:51 ` Felipe Balbi
2010-01-05 20:20 ` Tony Lindgren [this message]
2010-01-05 20:20 ` Tony Lindgren
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 11/12] arm: omap: mailbox: kill compile warning in mailbox.c Felipe Balbi
2009-12-29 22:51 ` Felipe Balbi
2009-12-29 22:51 ` [patch-v2.6.33-rc2+ 12/12] arm: omap: perseus: kill compile warning on board-perseus2.c Felipe Balbi
2009-12-29 22:51 ` Felipe Balbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100105202016.GA14533@atomide.com \
--to=tony@atomide.com \
--cc=felipe.balbi@nokia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.