All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Pavel Machek <pavel@ucw.cz>,
	Johannes Berg <johannes@sipsolutions.net>,
	linux-leds@vger.kernel.org
Subject: Re: [PATCH 1/4] leds: Change led_trigger_blink[_oneshot]() delay parameters to pass-by-value
Date: Wed, 10 May 2023 12:57:30 +0100	[thread overview]
Message-ID: <20230510115730.GA8963@google.com> (raw)
In-Reply-To: <20230412215855.593541-2-hdegoede@redhat.com>

On Wed, 12 Apr 2023, Hans de Goede wrote:

> led_blink_set[_oneshot]()'s delay_on and delay_off function parameters
> are pass by reference, so that hw-blink implementations can report
> back the actual achieved delays when the values have been rounded
> to something the hw supports.
> 
> This is really only interesting for the sysfs API / the timer trigger.
> Other triggers don't really care about this and none of the callers of
> led_trigger_blink[_oneshot]() do anything with the returned delay values.
> 
> Change the led_trigger_blink[_oneshot]() delay parameters to pass-by-value,
> there are 2 reasons for this:
> 
> 1. led_cdev->blink_set() may sleep, while led_trigger_blink() may not.
> So on hw where led_cdev->blink_set() sleeps the call needs to be deferred
> to a workqueue, in which case the actual achieved delays are unknown
> (this is a preparation patch for the deferring).
> 
> 2. Since the callers don't care about the actual achieved delays, allowing
> callers to directly pass a value leads to simpler code for most callers.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/leds/led-triggers.c              | 16 ++++++++--------
>  drivers/leds/trigger/ledtrig-disk.c      |  9 +++------
>  drivers/leds/trigger/ledtrig-mtd.c       |  8 ++------
>  drivers/net/arcnet/arcnet.c              |  8 ++------
>  drivers/power/supply/power_supply_leds.c |  5 +----
>  drivers/usb/common/led.c                 |  4 +---
>  include/linux/leds.h                     | 16 ++++++++--------
>  net/mac80211/led.c                       |  2 +-
>  net/mac80211/led.h                       |  8 ++------
>  net/netfilter/xt_LED.c                   |  3 +--
>  10 files changed, 29 insertions(+), 50 deletions(-)

Just came to apply this and realised that you have touched other
subsystems without Cc'ing the appropriate maintainers.

Please can you [RESEND] this set and include them please?

-- 
Lee Jones [李琼斯]

  reply	other threads:[~2023-05-10 11:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-12 21:58 [PATCH 0/4] Fix oops about sleeping in led_trigger_blink() Hans de Goede
2023-04-12 21:58 ` [PATCH 1/4] leds: Change led_trigger_blink[_oneshot]() delay parameters to pass-by-value Hans de Goede
2023-05-10 11:57   ` Lee Jones [this message]
2023-05-10 15:32     ` Hans de Goede
2023-04-12 21:58 ` [PATCH 2/4] leds: Fix set_brightness_delayed() race Hans de Goede
2023-04-12 21:58 ` [PATCH 3/4] leds: Fix oops about sleeping in led_trigger_blink() Hans de Goede
2023-04-12 21:58 ` [PATCH 4/4] leds: Clear LED_INIT_DEFAULT_TRIGGER when clearing current trigger Hans de Goede
2023-04-16 15:36 ` [PATCH 0/4] Fix oops about sleeping in led_trigger_blink() Jacek Anaszewski
2023-04-20 11:36 ` Lee Jones
2023-04-20 12:04   ` Hans de Goede
2023-04-20 13:56     ` Lee Jones
2023-04-25 14:03       ` Hans de Goede
2023-04-26 14:34         ` Lee Jones
2023-05-04 13:08           ` Yauhen Kharuzhy
2023-05-09  8:58           ` Hans de Goede

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=20230510115730.GA8963@google.com \
    --to=lee@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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.