diff mbox series

[27/31] net: mac80211 : changing LED_* from enum led_brightness to actual value

Message ID 20220121165436.30956-28-sampaio.ime@gmail.com
State New
Headers show
Series None | expand

Commit Message

Luiz Sampaio Jan. 21, 2022, 4:54 p.m. UTC
The enum led_brightness, which contains the declaration of LED_OFF,
LED_ON, LED_HALF and LED_FULL is obsolete, as the led class now supports
max_brightness.
---
 net/mac80211/led.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Johannes Berg Jan. 21, 2022, 7:28 p.m. UTC | #1
On Fri, 2022-01-21 at 13:54 -0300, Luiz Sampaio wrote:
> The enum led_brightness, which contains the declaration of LED_OFF,
> LED_ON, LED_HALF and LED_FULL is obsolete, as the led class now supports
> max_brightness.
> 

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

and particularly

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#commit_messages

would be a good thing to read.

Also, clearly you need to actually sign off your patches:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#developer-s-certificate-of-origin-1-1

(but yeah read the entire page)

Anyway, I'm with the other comments - what's the point in replacing
things like "LED_FULL" with arbitrary "255". I guess your commit message
should explain that, I don't see how it really is so obviously
"obsolete" that this needs no more comments.

johannes
diff mbox series

Patch

diff --git a/net/mac80211/led.c b/net/mac80211/led.c
index 6de8d0ad5497..ac36579636bb 100644
--- a/net/mac80211/led.c
+++ b/net/mac80211/led.c
@@ -14,9 +14,9 @@  void ieee80211_led_assoc(struct ieee80211_local *local, bool associated)
 	if (!atomic_read(&local->assoc_led_active))
 		return;
 	if (associated)
-		led_trigger_event(&local->assoc_led, LED_FULL);
+		led_trigger_event(&local->assoc_led, 255);
 	else
-		led_trigger_event(&local->assoc_led, LED_OFF);
+		led_trigger_event(&local->assoc_led, 0);
 }
 
 void ieee80211_led_radio(struct ieee80211_local *local, bool enabled)
@@ -24,9 +24,9 @@  void ieee80211_led_radio(struct ieee80211_local *local, bool enabled)
 	if (!atomic_read(&local->radio_led_active))
 		return;
 	if (enabled)
-		led_trigger_event(&local->radio_led, LED_FULL);
+		led_trigger_event(&local->radio_led, 255);
 	else
-		led_trigger_event(&local->radio_led, LED_OFF);
+		led_trigger_event(&local->radio_led, 0);
 }
 
 void ieee80211_alloc_led_names(struct ieee80211_local *local)
@@ -344,7 +344,7 @@  static void ieee80211_stop_tpt_led_trig(struct ieee80211_local *local)
 	tpt_trig->running = false;
 	del_timer_sync(&tpt_trig->timer);
 
-	led_trigger_event(&local->tpt_led, LED_OFF);
+	led_trigger_event(&local->tpt_led, 0);
 }
 
 void ieee80211_mod_tpt_led_trig(struct ieee80211_local *local,