From: Tony Lindgren <tony@atomide.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] ARM: omap1: avoid unused variable warning
Date: Tue, 23 Feb 2016 08:10:04 -0800 [thread overview]
Message-ID: <20160223161003.GY13417@atomide.com> (raw)
In-Reply-To: <1456235876-4088840-3-git-send-email-arnd@arndb.de>
* Arnd Bergmann <arnd@arndb.de> [160223 05:58]:
> The osk_mistral_init() contains code that is only compiled when
> CONFIG_PM is set, but it uses a variable that is declared outside
> of the #ifdef:
>
> arch/arm/mach-omap1/board-osk.c: In function 'osk_mistral_init':
> arch/arm/mach-omap1/board-osk.c:513:7: warning: unused variable 'ret' [-Wunused-variable]
>
> This puts the variable in the same #ifdef to avoid the warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/arm/mach-omap1/board-osk.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
> index 209aecb0df68..fcc5c0650429 100644
> --- a/arch/arm/mach-omap1/board-osk.c
> +++ b/arch/arm/mach-omap1/board-osk.c
> @@ -510,7 +510,9 @@ static void __init osk_mistral_init(void)
> */
> omap_cfg_reg(N15_1610_MPUIO2);
> if (gpio_request(OMAP_MPUIO(2), "wakeup") == 0) {
> +#ifdef CONFIG_PM
> int ret = 0;
> +#endif
> int irq = gpio_to_irq(OMAP_MPUIO(2));
>
> gpio_direction_input(OMAP_MPUIO(2));
Let's just remove the #ifdef CONFIG_PM in osk_mistral_init()
instead. That's for the wake-up button and I'm not aware
of any other use cases for that button.
Regards,
Tony
WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] ARM: omap1: avoid unused variable warning
Date: Tue, 23 Feb 2016 08:10:04 -0800 [thread overview]
Message-ID: <20160223161003.GY13417@atomide.com> (raw)
In-Reply-To: <1456235876-4088840-3-git-send-email-arnd@arndb.de>
* Arnd Bergmann <arnd@arndb.de> [160223 05:58]:
> The osk_mistral_init() contains code that is only compiled when
> CONFIG_PM is set, but it uses a variable that is declared outside
> of the #ifdef:
>
> arch/arm/mach-omap1/board-osk.c: In function 'osk_mistral_init':
> arch/arm/mach-omap1/board-osk.c:513:7: warning: unused variable 'ret' [-Wunused-variable]
>
> This puts the variable in the same #ifdef to avoid the warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/arm/mach-omap1/board-osk.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
> index 209aecb0df68..fcc5c0650429 100644
> --- a/arch/arm/mach-omap1/board-osk.c
> +++ b/arch/arm/mach-omap1/board-osk.c
> @@ -510,7 +510,9 @@ static void __init osk_mistral_init(void)
> */
> omap_cfg_reg(N15_1610_MPUIO2);
> if (gpio_request(OMAP_MPUIO(2), "wakeup") == 0) {
> +#ifdef CONFIG_PM
> int ret = 0;
> +#endif
> int irq = gpio_to_irq(OMAP_MPUIO(2));
>
> gpio_direction_input(OMAP_MPUIO(2));
Let's just remove the #ifdef CONFIG_PM in osk_mistral_init()
instead. That's for the wake-up button and I'm not aware
of any other use cases for that button.
Regards,
Tony
next prev parent reply other threads:[~2016-02-23 16:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-23 13:57 [PATCH 0/3] ARM: omap: randconfig warning fixes Arnd Bergmann
2016-02-23 13:57 ` Arnd Bergmann
2016-02-23 13:57 ` [PATCH 1/3] ARM: omap2: mark unused functions as __maybe_unused Arnd Bergmann
2016-02-23 13:57 ` Arnd Bergmann
2016-02-23 16:07 ` Tony Lindgren
2016-02-23 16:07 ` Tony Lindgren
2016-02-23 13:57 ` [PATCH 2/3] ARM: omap1: avoid unused variable warning Arnd Bergmann
2016-02-23 13:57 ` Arnd Bergmann
2016-02-23 16:10 ` Tony Lindgren [this message]
2016-02-23 16:10 ` Tony Lindgren
2016-02-23 23:40 ` Aaro Koskinen
2016-02-23 23:40 ` Aaro Koskinen
2016-02-23 13:57 ` [PATCH 3/3] ARM: omap1/ams-delta: warn about failed regulator enable Arnd Bergmann
2016-02-23 13:57 ` Arnd Bergmann
2016-02-23 16:10 ` Tony Lindgren
2016-02-23 16:10 ` Tony Lindgren
2016-02-23 16:15 ` One Thousand Gnomes
2016-02-23 16:15 ` One Thousand Gnomes
2016-02-23 23:40 ` Aaro Koskinen
2016-02-23 23:40 ` Aaro Koskinen
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=20160223161003.GY13417@atomide.com \
--to=tony@atomide.com \
--cc=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.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.