Re: [PATCH v7 02/16] leds: triggers: let struct led_trigger::activate() return an error code

From: Jacek Anaszewski
Date: Thu Jul 05 2018 - 17:31:39 EST


Hi Uwe,

On 07/02/2018 10:05 PM, Uwe Kleine-KÃnig wrote:
Given that activating a trigger can fail, let the callback return an
indication. This prevents to have a trigger active according to the
"trigger" sysfs attribute but not functional.

All users are changed accordingly to return 0 for now. There is no intended
change in behaviour.

Acked-by: Pavel Machek <pavel@xxxxxx>
Signed-off-by: Uwe Kleine-KÃnig <u.kleine-koenig@xxxxxxxxxxxxxx>
[...]
-static void ieee80211_tx_led_activate(struct led_classdev *led_cdev)
+static int ieee80211_tx_led_activate(struct led_classdev *led_cdev)
{
struct ieee80211_local *local = container_of(led_cdev->trigger,
struct ieee80211_local,
tx_led);
atomic_inc(&local->tx_led_active);
+
+ return 0
[...]

s/return 0/return 0;/

Fixed it up and applied. I'm taking lack of net maintainer feedback
as a tacit approval (or lack of interest).

--
Best regards,
Jacek Anaszewski