public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] software node: Also support referencing non-constant software nodes
       [not found] <af773b82-bef2-4209-baaf-526d4661b7fc@panix.com>
@ 2025-12-19  8:36 ` Sakari Ailus
  2025-12-19 13:13   ` Mehdi Djait
                     ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Sakari Ailus @ 2025-12-19  8:36 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, Rafael J. Wysocki, Danilo Krummrich,
	Andy Shevchenko, Daniel Scally, Heikki Krogerus, Linus Walleij,
	Philipp Zabel, Charles Keepax, linux-acpi, Kenneth Crudup,
	linux-media, johannes.goede, Bartosz Golaszewski

Fwnode references are be implemented differently if referenced node is a
software node. _Generic() is used to differentiate between the two cases
but only const software nodes were present in the selection. Also add
non-const software nodes.

Reported-by: Kenneth Crudup <kenny@panix.com>
Closes: https://lore.kernel.org/all/af773b82-bef2-4209-baaf-526d4661b7fc@panix.com/
Fixes: d7cdbbc93c56 ("software node: allow referencing firmware nodes")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
Hi Kenneth,

Many thanks for reporting the issue and bisecting the offending patch!
Could you confirm whether this fixes the issue (it does for me)?

- Sakari

 include/linux/property.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/property.h b/include/linux/property.h
index 272bfbdea7bf..e30ef23a9af3 100644
--- a/include/linux/property.h
+++ b/include/linux/property.h
@@ -371,6 +371,7 @@ struct software_node_ref_args {
 (const struct software_node_ref_args) {				\
 	.swnode = _Generic(_ref_,				\
 			   const struct software_node *: _ref_,	\
+			   struct software_node *: _ref_,	\
 			   default: NULL),			\
 	.fwnode = _Generic(_ref_,				\
 			   struct fwnode_handle *: _ref_,	\
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] software node: Also support referencing non-constant software nodes
  2025-12-19  8:36 ` [PATCH 1/1] software node: Also support referencing non-constant software nodes Sakari Ailus
@ 2025-12-19 13:13   ` Mehdi Djait
  2025-12-19 15:05     ` johannes.goede
  2025-12-19 20:55   ` Kenneth Crudup
  2025-12-22 12:36   ` Danilo Krummrich
  2 siblings, 1 reply; 8+ messages in thread
From: Mehdi Djait @ 2025-12-19 13:13 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: linux-kernel, Greg Kroah-Hartman, Rafael J. Wysocki,
	Danilo Krummrich, Andy Shevchenko, Daniel Scally, Heikki Krogerus,
	Linus Walleij, Philipp Zabel, Charles Keepax, linux-acpi,
	Kenneth Crudup, linux-media, johannes.goede, Bartosz Golaszewski

Hi Sakari,

Thank you for the patch.

On Fri, Dec 19, 2025 at 10:36:38AM +0200, Sakari Ailus wrote:
> Fwnode references are be implemented differently if referenced node is a
> software node. _Generic() is used to differentiate between the two cases
> but only const software nodes were present in the selection. Also add
> non-const software nodes.
> 

it works for me.

Tested-by: Mehdi Djait <mehdi.djait@linux.intel.com> # Dell XPS 9315
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>

> Reported-by: Kenneth Crudup <kenny@panix.com>
> Closes: https://lore.kernel.org/all/af773b82-bef2-4209-baaf-526d4661b7fc@panix.com/
> Fixes: d7cdbbc93c56 ("software node: allow referencing firmware nodes")
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] software node: Also support referencing non-constant software nodes
  2025-12-19 13:13   ` Mehdi Djait
@ 2025-12-19 15:05     ` johannes.goede
  2025-12-19 15:11       ` Danilo Krummrich
  0 siblings, 1 reply; 8+ messages in thread
From: johannes.goede @ 2025-12-19 15:05 UTC (permalink / raw)
  To: Mehdi Djait, Sakari Ailus
  Cc: linux-kernel, Greg Kroah-Hartman, Rafael J. Wysocki,
	Danilo Krummrich, Andy Shevchenko, Daniel Scally, Heikki Krogerus,
	Linus Walleij, Philipp Zabel, Charles Keepax, linux-acpi,
	Kenneth Crudup, linux-media, Bartosz Golaszewski

Hi,

On 19-Dec-25 14:13, Mehdi Djait wrote:
> Hi Sakari,
> 
> Thank you for the patch.
> 
> On Fri, Dec 19, 2025 at 10:36:38AM +0200, Sakari Ailus wrote:
>> Fwnode references are be implemented differently if referenced node is a
>> software node. _Generic() is used to differentiate between the two cases
>> but only const software nodes were present in the selection. Also add
>> non-const software nodes.
>>
> 
> it works for me.
> 
> Tested-by: Mehdi Djait <mehdi.djait@linux.intel.com> # Dell XPS 9315
> Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>

Sakari, thank you for fixing this.

Since this fixes a 6.19 regression: Can someone please submit
a pull-request with "[GIT FIXES for v6.19]" pull-request to
Hans + Mauro with this patch?

Regards,

Hans



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] software node: Also support referencing non-constant software nodes
  2025-12-19 15:05     ` johannes.goede
@ 2025-12-19 15:11       ` Danilo Krummrich
  2025-12-19 15:38         ` johannes.goede
  0 siblings, 1 reply; 8+ messages in thread
From: Danilo Krummrich @ 2025-12-19 15:11 UTC (permalink / raw)
  To: johannes.goede
  Cc: Mehdi Djait, Sakari Ailus, linux-kernel, Greg Kroah-Hartman,
	Rafael J. Wysocki, Andy Shevchenko, Daniel Scally,
	Heikki Krogerus, Linus Walleij, Philipp Zabel, Charles Keepax,
	linux-acpi, Kenneth Crudup, linux-media, Bartosz Golaszewski

On Fri Dec 19, 2025 at 4:05 PM CET, johannes.goede wrote:
> Since this fixes a 6.19 regression: Can someone please submit
> a pull-request with "[GIT FIXES for v6.19]" pull-request to
> Hans + Mauro with this patch?

This code is maintained throught the driver-core tree and fixes for the current
release cycle ending up in this tree will be sent to Linus directly for the next
appropriate -rc.

Is there any specific reason for this request?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] software node: Also support referencing non-constant software nodes
  2025-12-19 15:11       ` Danilo Krummrich
@ 2025-12-19 15:38         ` johannes.goede
  2025-12-19 15:47           ` Danilo Krummrich
  0 siblings, 1 reply; 8+ messages in thread
From: johannes.goede @ 2025-12-19 15:38 UTC (permalink / raw)
  To: Danilo Krummrich
  Cc: Mehdi Djait, Sakari Ailus, linux-kernel, Greg Kroah-Hartman,
	Rafael J. Wysocki, Andy Shevchenko, Daniel Scally,
	Heikki Krogerus, Linus Walleij, Philipp Zabel, Charles Keepax,
	linux-acpi, Kenneth Crudup, linux-media, Bartosz Golaszewski

Hi Danilo,

On 19-Dec-25 16:11, Danilo Krummrich wrote:
> On Fri Dec 19, 2025 at 4:05 PM CET, johannes.goede wrote:
>> Since this fixes a 6.19 regression: Can someone please submit
>> a pull-request with "[GIT FIXES for v6.19]" pull-request to
>> Hans + Mauro with this patch?
> 
> This code is maintained throught the driver-core tree and fixes for the current
> release cycle ending up in this tree will be sent to Linus directly for the next
> appropriate -rc.
> 
> Is there any specific reason for this request?

No reason other then me not paying attention and since this fixes
an issue related to IPU6 cameras I typed the above on auto-pilot,
my bad.

You're completely right this should go upstream through driver core
and my request makes no sense, sorry.

Regards,

Hans



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] software node: Also support referencing non-constant software nodes
  2025-12-19 15:38         ` johannes.goede
@ 2025-12-19 15:47           ` Danilo Krummrich
  0 siblings, 0 replies; 8+ messages in thread
From: Danilo Krummrich @ 2025-12-19 15:47 UTC (permalink / raw)
  To: johannes.goede
  Cc: Mehdi Djait, Sakari Ailus, linux-kernel, Greg Kroah-Hartman,
	Rafael J. Wysocki, Andy Shevchenko, Daniel Scally,
	Heikki Krogerus, Linus Walleij, Philipp Zabel, Charles Keepax,
	linux-acpi, Kenneth Crudup, linux-media, Bartosz Golaszewski

On Fri Dec 19, 2025 at 4:38 PM CET, johannes.goede wrote:
> No reason other then me not paying attention and since this fixes
> an issue related to IPU6 cameras I typed the above on auto-pilot,
> my bad.
>
> You're completely right this should go upstream through driver core
> and my request makes no sense, sorry.

No worries, could have been there is a specific reason. :)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] software node: Also support referencing non-constant software nodes
  2025-12-19  8:36 ` [PATCH 1/1] software node: Also support referencing non-constant software nodes Sakari Ailus
  2025-12-19 13:13   ` Mehdi Djait
@ 2025-12-19 20:55   ` Kenneth Crudup
  2025-12-22 12:36   ` Danilo Krummrich
  2 siblings, 0 replies; 8+ messages in thread
From: Kenneth Crudup @ 2025-12-19 20:55 UTC (permalink / raw)
  To: Sakari Ailus, linux-kernel
  Cc: Greg Kroah-Hartman, Rafael J. Wysocki, Danilo Krummrich,
	Andy Shevchenko, Daniel Scally, Heikki Krogerus, Linus Walleij,
	Philipp Zabel, Charles Keepax, linux-acpi, linux-media,
	johannes.goede, Bartosz Golaszewski


Apparently last to the party :) but:

Tested-By: Kenneth R. Crudup <kenny@panix.com>

-K

On 12/19/25 00:36, Sakari Ailus wrote:
> Fwnode references are be implemented differently if referenced node is a
> software node. _Generic() is used to differentiate between the two cases
> but only const software nodes were present in the selection. Also add
> non-const software nodes.
> 
> Reported-by: Kenneth Crudup <kenny@panix.com>
> Closes: https://lore.kernel.org/all/af773b82-bef2-4209-baaf-526d4661b7fc@panix.com/
> Fixes: d7cdbbc93c56 ("software node: allow referencing firmware nodes")
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> Hi Kenneth,
> 
> Many thanks for reporting the issue and bisecting the offending patch!
> Could you confirm whether this fixes the issue (it does for me)?
> 
> - Sakari
> 
>   include/linux/property.h | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/property.h b/include/linux/property.h
> index 272bfbdea7bf..e30ef23a9af3 100644
> --- a/include/linux/property.h
> +++ b/include/linux/property.h
> @@ -371,6 +371,7 @@ struct software_node_ref_args {
>   (const struct software_node_ref_args) {				\
>   	.swnode = _Generic(_ref_,				\
>   			   const struct software_node *: _ref_,	\
> +			   struct software_node *: _ref_,	\
>   			   default: NULL),			\
>   	.fwnode = _Generic(_ref_,				\
>   			   struct fwnode_handle *: _ref_,	\

-- 
Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting, Orange 
County CA


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/1] software node: Also support referencing non-constant software nodes
  2025-12-19  8:36 ` [PATCH 1/1] software node: Also support referencing non-constant software nodes Sakari Ailus
  2025-12-19 13:13   ` Mehdi Djait
  2025-12-19 20:55   ` Kenneth Crudup
@ 2025-12-22 12:36   ` Danilo Krummrich
  2 siblings, 0 replies; 8+ messages in thread
From: Danilo Krummrich @ 2025-12-22 12:36 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: linux-kernel, Greg Kroah-Hartman, Rafael J. Wysocki,
	Andy Shevchenko, Daniel Scally, Heikki Krogerus, Linus Walleij,
	Philipp Zabel, Charles Keepax, linux-acpi, Kenneth Crudup,
	linux-media, johannes.goede, Bartosz Golaszewski

On Fri Dec 19, 2025 at 9:36 AM CET, Sakari Ailus wrote:
> Fwnode references are be implemented differently if referenced node is a
> software node. _Generic() is used to differentiate between the two cases
> but only const software nodes were present in the selection. Also add
> non-const software nodes.
>
> Reported-by: Kenneth Crudup <kenny@panix.com>
> Closes: https://lore.kernel.org/all/af773b82-bef2-4209-baaf-526d4661b7fc@panix.com/
> Fixes: d7cdbbc93c56 ("software node: allow referencing firmware nodes")
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Applied to driver-core-linus, thanks!

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-12-22 12:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <af773b82-bef2-4209-baaf-526d4661b7fc@panix.com>
2025-12-19  8:36 ` [PATCH 1/1] software node: Also support referencing non-constant software nodes Sakari Ailus
2025-12-19 13:13   ` Mehdi Djait
2025-12-19 15:05     ` johannes.goede
2025-12-19 15:11       ` Danilo Krummrich
2025-12-19 15:38         ` johannes.goede
2025-12-19 15:47           ` Danilo Krummrich
2025-12-19 20:55   ` Kenneth Crudup
2025-12-22 12:36   ` Danilo Krummrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox