Skip to contentSkip to conversation

net/rfkill/rfkill.c: fix unused rfkill_led_trigger() warning

PATCH Applied Simon Holm Thøgersen 3 participants 3 messages Dec 31, 2008 – Jan 5, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/rfkill/rfkill.c: fix unused rfkill_led_trigger() warning

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

---
 net/rfkill/rfkill.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
net/rfkill/rfkill.c +1 -3
index 3c94f76..3eaa394 100644
@@ -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,
Signature · 1 line
1.6.0.2.526.g5c283
Acked-by on v1 1/1
#1 lore raw
Quoted 1 line · On Wed, Dec 31, 2008 at 10:09 AM, Simon Holm Th=F8gersen <[email protected]= k>…

commit 4dec9b807be757780ca3611a959ac22c28d292a7 ("rfkill: strip point=

less

Quoted 1 line

notifier chain") removed the only user of rfkill_led_trigger() that w=

as not

Quoted 1 line

guarded by #ifdef CONFIG_RFKILL_LEDS. Therefore, move rfkill_led_trig=

ger()

Quoted 1 line

completely inside #ifdef CONFIG_RFKILL_LEDS and avoid the compile tim=

e

Quoted 3 lines

warning:

net/rfkill/rfkill.c:59: warning: 'rfkill_led_trigger' defined but not=

used

Quoted 2 lines

net/rfkill/rfkill.c static unsigned long rfkill_states_lockdflt[BITS_=

Quoted 9 lines
---
 net/rfkill/rfkill.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
net/rfkill/rfkill.c +0 -0
index 3c94f76..3eaa394 100644
@@ -54,10 +54,10 @@ static unsigned long rfkill_states_lockdflt[BITS_=

TO_LONGS(RFKILL_TYPE_MAX)];

net/rfkill/rfkill.c static void rfkill_led_trigger(struct rfkill *rfki=

Quoted 12 lines
net/rfkill/rfkill.c +1 -1
 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 =3D &rfkill->led_trigger;
 
       if (!led->name)
@@ -66,10 +66,8 @@ static void rfkill_led_trigger(struct rfkill *rfki=

ll,

Quoted 11 lines
net/rfkill/rfkill.c +0 -3
               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 =3D container_of(led->trigger,
--
Quoted 3 lines

1.6.0.2.526.g5c283

--
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer Applied
#2 lore raw
In reply to Simon Holm Thøgersen

From: Simon Holm Thøgersen <[email protected]>
Date: Wed, 31 Dec 2008 10:09:18 +0100

Quoted 9 lines

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

Applied, thanks Simon.