From: "Ivo Van Doorn" <ivdoorn@gmail.com>
To: "Simon Holm Thøgersen" <odie@cs.aau.dk>
Cc: netdev <netdev@vger.kernel.org>,
linux-wireless <linux-wireless@vger.kernel.org>,
"John Linville" <linville@tuxdriver.com>
Subject: Re: [PATCH] net/rfkill/rfkill.c: fix unused rfkill_led_trigger() warning
Date: Wed, 31 Dec 2008 10:31:13 +0100 [thread overview]
Message-ID: <a32f33a40812310131o3207f10p2499b129d2701f3a@mail.gmail.com> (raw)
In-Reply-To: <1230714558.24416.1.camel@odie.local>
On Wed, Dec 31, 2008 at 10:09 AM, Simon Holm Thøgersen <odie@cs.aau.dk> wrote:
> commit 4dec9b807be757780ca3611a959ac22c28d292a7 ("rfkill: strip pointless
> notifier chain") removed the only user of rfkill_led_trigger() that was not
> guarded by #ifdef CONFIG_RFKILL_LEDS. Therefore, move rfkill_led_trigger()
> completely inside #ifdef CONFIG_RFKILL_LEDS and avoid the compile time
> warning:
>
> net/rfkill/rfkill.c:59: warning: 'rfkill_led_trigger' defined but not used
>
> Signed-off-by: Simon Holm Thøgersen <odie@cs.aau.dk>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
> ---
> net/rfkill/rfkill.c | 4 +---
> 1 files changed, 1 insertions(+), 3 deletions(-)
>
> diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c
> index 3c94f76..3eaa394 100644
> --- a/net/rfkill/rfkill.c
> +++ b/net/rfkill/rfkill.c
> @@ -54,10 +54,10 @@ static unsigned long rfkill_states_lockdflt[BITS_TO_LONGS(RFKILL_TYPE_MAX)];
> static bool rfkill_epo_lock_active;
>
>
> +#ifdef CONFIG_RFKILL_LEDS
> static void rfkill_led_trigger(struct rfkill *rfkill,
> enum rfkill_state state)
> {
> -#ifdef CONFIG_RFKILL_LEDS
> struct led_trigger *led = &rfkill->led_trigger;
>
> if (!led->name)
> @@ -66,10 +66,8 @@ static void rfkill_led_trigger(struct rfkill *rfkill,
> led_trigger_event(led, LED_OFF);
> else
> led_trigger_event(led, LED_FULL);
> -#endif /* CONFIG_RFKILL_LEDS */
> }
>
> -#ifdef CONFIG_RFKILL_LEDS
> static void rfkill_led_trigger_activate(struct led_classdev *led)
> {
> struct rfkill *rfkill = container_of(led->trigger,
> --
> 1.6.0.2.526.g5c283
>
>
next prev parent reply other threads:[~2008-12-31 9:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-31 9:09 [PATCH] net/rfkill/rfkill.c: fix unused rfkill_led_trigger() warning Simon Holm Thøgersen
2008-12-31 9:31 ` Ivo Van Doorn [this message]
2009-01-05 1:11 ` David Miller
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=a32f33a40812310131o3207f10p2499b129d2701f3a@mail.gmail.com \
--to=ivdoorn@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
--cc=odie@cs.aau.dk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).