lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <DS0PR84MB374654D9715FE2FAAC4C299D9FBEA@DS0PR84MB3746.NAMPRD84.PROD.OUTLOOK.COM>
Date: Sun, 28 Dec 2025 18:43:18 +0000
From: Jonathan Brophy <Professor_jonny@...mail.com>
To: Andriy Shevencho <andriy.shevchenko@...ux.intel.com>, Jonathan Brophy
	<professorjonny98@...il.com>
CC: lee Jones <lee@...nel.org>, Pavel Machek <pavel@...nel.org>, Rob Herring
	<robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
	<conor+dt@...nel.org>, Radoslav Tsvetkov <rtsvetkov@...dotech.eu>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>
Subject: Re: [RFC PATCH 1/2] leds: core: Add support for led-instance property

>But this will be called unconditionally even if the

>function/function-enumerator is present. Wouldn't these be conflicting options?
>
>--
>
>With Best Regards,
>
>Andy Shevchenko

Good point! You're right that function-enumerator and led-instance could
conflict. I'll make them mutually exclusive.

The semantic difference is:
- function-enumerator: Numeric instances (0, 1, 2...) → "lan:green-5"
- led-instance: Semantic instances ("port23") → "lan:green:port23"

Having both would create "lan:green-5:port23" which is confusing.

I can add validation to reject DT nodes that specify both:

  if (props->func_enum_present && instance) {
      dev_err(dev, "'led-instance' and 'function-enumerator' are mutually exclusive\n");
      return -EINVAL;
  }

And document this in the DT binding:

  "This property cannot be used together with function-enumerator.
   Use function-enumerator for numeric instances (0, 1, 2) or
   led-instance for semantic instances (port0, battery, usb)."

would this be ok ?





Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ