From: Florian Westphal <fw@strlen.de>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Pavel Machek <pavel@ucw.cz>,
Jacek Anaszewski <jacek.anaszewski@gmail.com>,
Lee Jones <lee@kernel.org>, Sebastian Reichel <sre@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Michael Grzeschik <m.grzeschik@pengutronix.de>,
Johannes Berg <johannes@sipsolutions.net>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Jozsef Kadlecsik <kadlec@netfilter.org>,
linux-leds@vger.kernel.org, linux-pm@vger.kernel.org,
linux-usb@vger.kernel.org, netdev@vger.kernel.org,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
Yauhen Kharuzhy <jekhor@gmail.com>
Subject: Re: [PATCH RESEND 1/4] leds: Change led_trigger_blink[_oneshot]() delay parameters to pass-by-value
Date: Wed, 10 May 2023 23:43:38 +0200 [thread overview]
Message-ID: <20230510214338.GE21949@breakpoint.cc> (raw)
In-Reply-To: <20230510162234.291439-2-hdegoede@redhat.com>
Hans de Goede <hdegoede@redhat.com> 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.
For netfilter:
Acked-by: Florian Westphal <fw@strlen.de>
next prev parent reply other threads:[~2023-05-10 21:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-10 16:22 [PATCH RESEND 0/4] Fix oops about sleeping in led_trigger_blink() Hans de Goede
2023-05-10 16:22 ` [PATCH RESEND 1/4] leds: Change led_trigger_blink[_oneshot]() delay parameters to pass-by-value Hans de Goede
2023-05-10 18:19 ` Sebastian Reichel
2023-05-10 21:43 ` Florian Westphal [this message]
2023-05-10 22:53 ` Greg Kroah-Hartman
2023-05-18 12:12 ` Lee Jones
2023-05-10 16:22 ` [PATCH RESEND 2/4] leds: Fix set_brightness_delayed() race Hans de Goede
2023-05-18 12:13 ` Lee Jones
2023-05-10 16:22 ` [PATCH RESEND 3/4] leds: Fix oops about sleeping in led_trigger_blink() Hans de Goede
2023-05-18 12:13 ` Lee Jones
2023-05-10 16:22 ` [PATCH RESEND 4/4] leds: Clear LED_INIT_DEFAULT_TRIGGER when clearing current trigger Hans de Goede
2023-05-18 12:14 ` Lee Jones
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=20230510214338.GE21949@breakpoint.cc \
--to=fw@strlen.de \
--cc=coreteam@netfilter.org \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=jacek.anaszewski@gmail.com \
--cc=jekhor@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=kadlec@netfilter.org \
--cc=lee@kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.grzeschik@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=pavel@ucw.cz \
--cc=sre@kernel.org \
/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).