Re: [PATCH v7 3/9] software node: allow referencing firmware nodes

From: Danilo Krummrich

Date: Tue Dec 23 2025 - 05:41:59 EST


On Tue Dec 23, 2025 at 10:48 AM CET, Jiawen Wu wrote:
> On Tue, Dec 23, 2025 5:37 PM, Bartosz Golaszewski wrote:
>> On Tue, Dec 23, 2025 at 9:44 AM Jiawen Wu <jiawenwu@xxxxxxxxxxxxxx> wrote:
>> > And I temporarily added this line to fix it:
>> >
>> > 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_, \
>> >
>>
>> Ah I see, we'd assign struct software_node * to const struct
>> software_node * and it used to work but with _Generic() we need the
>> exact type. I agree with this approach, do you want to send a proper
>> patch?
>
> It might be more appropriate for you to send the patch, and could also
> check if there are any other missed details, like for fwnode...
> I'm not very proficient in this field. :)

There is already [1], which I queued up in the driver-core tree to send as fix
for -rc3.

[1] https://lore.kernel.org/lkml/20251219083638.2454138-1-sakari.ailus@xxxxxxxxxxxxxxx/