Skip to content

Commit bfcca46

Browse files
Zijun Hugregkh
authored andcommitted
of: property: Increase NR_FWNODE_REFERENCE_ARGS
[ Upstream commit eb50844 ] Currently, the following two macros have different values: // The maximal argument count for firmware node reference #define NR_FWNODE_REFERENCE_ARGS 8 // The maximal argument count for DT node reference #define MAX_PHANDLE_ARGS 16 It may cause firmware node reference's argument count out of range if directly assign DT node reference's argument count to firmware's. drivers/of/property.c:of_fwnode_get_reference_args() is doing the direct assignment, so may cause firmware's argument count @args->nargs got out of range, namely, in [9, 16]. Fix by increasing NR_FWNODE_REFERENCE_ARGS to 16 to meet DT requirement. Will align both macros later to avoid such inconsistency. Fixes: 3e3119d ("device property: Introduce fwnode_property_get_reference_args") Signed-off-by: Zijun Hu <[email protected]> Acked-by: Sakari Ailus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 2df19f5 commit bfcca46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/fwnode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ struct fwnode_endpoint {
9191
#define SWNODE_GRAPH_PORT_NAME_FMT "port@%u"
9292
#define SWNODE_GRAPH_ENDPOINT_NAME_FMT "endpoint@%u"
9393

94-
#define NR_FWNODE_REFERENCE_ARGS 8
94+
#define NR_FWNODE_REFERENCE_ARGS 16
9595

9696
/**
9797
* struct fwnode_reference_args - Fwnode reference with additional arguments

0 commit comments

Comments
 (0)