public inbox for linux-leds@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Lee Jones <lee@kernel.org>
Cc: Michael Tretter <m.tretter@pengutronix.de>,
	Pavel Machek <pavel@kernel.org>, Dan Murphy <dmurphy@ti.com>,
	Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	Pavel Machek <pavel@ucw.cz>,
	linux-leds@vger.kernel.org, kernel@pengutronix.de,
	Khalid Talash <ktalash@topcon.com>
Subject: Re: [PATCH] leds: multicolor: limit intensity to max_brightness of LED
Date: Fri, 6 Mar 2026 17:09:46 +0200	[thread overview]
Message-ID: <aaruOlCwePDD5WXc@ashevche-desk.local> (raw)
In-Reply-To: <20260306135505.GN183676@google.com>

On Fri, Mar 06, 2026 at 01:55:05PM +0000, Lee Jones wrote:
> On Thu, 05 Mar 2026, Andy Shevchenko wrote:
> > On Fri, Jan 23, 2026 at 11:13:24AM +0100, Michael Tretter wrote:
> > > According to Documentation/ABI/testing/sysfs-class-led-multicolor, the
> > > intensity should not exceed /sys/class/leds/<led>/max_brightness.
> > > 
> > > The interface doesn't check the values and higher values may lead to
> > > unexpected color changes if the brightness is changed.
> > > 
> > > Clamp the intensity value to max_brightness.
> > 
> > This also brings a regression if somebody doesn't care about wrapping around.
> > It's possible to return an error instead, but still the user space will be
> > broken (in some rare weird cases).
> > 
> > Again, I care even less about this change, but be always careful,
> > the main rule in the kernel "We do NOT break user space".
> 
> I'm going to remove this patch for now.

Wow, it was even never compiled!
For sure, please drop it.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-03-06 15:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-23 10:13 [PATCH] leds: multicolor: limit intensity to max_brightness of LED Michael Tretter
2026-02-05 15:51 ` (subset) " Lee Jones
2026-03-05 14:08 ` Andy Shevchenko
2026-03-06 11:30   ` Lee Jones
2026-03-06 15:08     ` Andy Shevchenko
2026-03-06 13:55   ` Lee Jones
2026-03-06 15:09     ` Andy Shevchenko [this message]
2026-03-06 15:34       ` Michael Tretter
2026-03-06 15:29     ` Michael Tretter
2026-03-06 18:58       ` Andy Shevchenko

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=aaruOlCwePDD5WXc@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=dmurphy@ti.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=ktalash@topcon.com \
    --cc=lee@kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=m.tretter@pengutronix.de \
    --cc=pavel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox