]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commitdiff
of: Align macro MAX_PHANDLE_ARGS with NR_FWNODE_REFERENCE_ARGS
authorZijun Hu <quic_zijuhu@quicinc.com>
Tue, 25 Feb 2025 13:58:07 +0000 (21:58 +0800)
committerRob Herring (Arm) <robh@kernel.org>
Wed, 26 Feb 2025 19:15:57 +0000 (13:15 -0600)
Macro NR_FWNODE_REFERENCE_ARGS defines the maximal argument count
for firmware node reference, and MAX_PHANDLE_ARGS defines the maximal
argument count for DT node reference, both have the same value now.

To void argument count inconsistency between firmware and DT, simply
align both macros by '#define MAX_PHANDLE_ARGS NR_FWNODE_REFERENCE_ARGS'.

Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20250225-fix_arg_count-v4-2-13cdc519eb31@quicinc.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
include/linux/of.h

index eaf0e2a2b75cbe4769a77f68965298c84d57e62c..86bf8f0731112456b3efc2e5ee00e73000c6af56 100644 (file)
@@ -67,7 +67,7 @@ struct device_node {
 #endif
 };
 
-#define MAX_PHANDLE_ARGS 16
+#define MAX_PHANDLE_ARGS NR_FWNODE_REFERENCE_ARGS
 struct of_phandle_args {
        struct device_node *np;
        int args_count;