Re: [PATCH v3] of: property: Increase NR_FWNODE_REFERENCE_ARGS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2025/2/11 22:22, Rob Herring wrote:
>> i have confirmed that:
>>
>> of.h includes fwnode.h indirectly
>> fwnode.h does not include of.h directly or indirectly
> Only for struct fwnode_handle. I don't think we want to add to that.
> For the most part, fwnode is a layer above DT and the DT code should
> know nothing about fwnode.

DT, as a type of firmware node, needs to implement firmware node
interfaces 'struct fwnode_operations' defined in fwnode.h.

so it includes fwnode.h and knows everything of fwnode.h

A)
diff --git a/include/linux/of.h b/include/linux/of.h
#define MAX_PHANDLE_ARGS 16
 struct of_phandle_args {
        struct device_node *np;
        int args_count;
        uint32_t args[MAX_PHANDLE_ARGS];
 };
+static_assert(NR_FWNODE_REFERENCE_ARGS == MAX_PHANDLE_ARGS);

B)
diff --git a/include/linux/of.h b/include/linux/of.h
-#define MAX_PHANDLE_ARGS 16
+#define MAX_PHANDLE_ARGS NR_FWNODE_REFERENCE_ARGS

you like solution A), right ?




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux