[PATCH 1/1] software node: Also support referencing non-constant software nodes
From: Sakari Ailus
Date: Fri Dec 19 2025 - 03:36:51 EST
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@xxxxxxxxx>
Closes: https://lore.kernel.org/all/af773b82-bef2-4209-baaf-526d4661b7fc@xxxxxxxxx/
Fixes: d7cdbbc93c56 ("software node: allow referencing firmware nodes")
Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
---
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