devfreq: Use of_node_name_eq for node name comparisons
PATCH 1/1 devfreq: Use of_node_name_eq for node name comparisons
Convert string compares of DT node names to use of_node_name_eq helper instead. This removes direct access to the node name pointer.
For instances using of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which all of these are.
--- drivers/devfreq/devfreq-event.c | 2 +- drivers/devfreq/event/exynos-ppmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/devfreq/devfreq-event.c +1 -1
@@ -240,7 +240,7 @@ struct devfreq_event_dev *devfreq_event_get_edev_by_phandle(struct device *dev, }list_for_each_entry (edev, &devfreq_event_list, node) { -if (!strcmp (edev->desc->name, node->name)) +if (of_node_name_eq (node, edev->desc->name)) goto out; } edev =NULL ;
drivers/devfreq/event/exynos-ppmu.c +1 -1
@@ -529,7 +529,7 @@ static int of_get_devfreq_events(struct device_node *np,if (!ppmu_events[i].name)continue ; -if (!of_node_cmp (node->name, ppmu_events[i].name)) +if (of_node_name_eq (node, ppmu_events[i].name))break ; }
Signature · 1 line
2.19.1
Quoted 8 lines · Rob Herring
Convert string compares of DT node names to use
of_node_name_eqhelper instead. This removes direct access to the node name pointer.For instances using
of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which all of these are.
Quoted 9 lines
Cc Chanwoo Choi <[email protected]>Cc MyungJoo Ham <[email protected]>Cc Kyungmin Park <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 4 lines
--- drivers/devfreq/devfreq-event.c | 2 +- drivers/devfreq/event/exynos-ppmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Quoted 17 lines · Rob Herring
Convert string compares of DT node names to use
of_node_name_eqhelper instead. This removes direct access to the node name pointer.For instances using
of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which all of these are.Cc Chanwoo Choi <[email protected]>Cc MyungJoo Ham <[email protected]>Cc Kyungmin Park <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Signed-off-by Rob Herring <[email protected]>
Quoted 4 lines
--- drivers/devfreq/devfreq-event.c | 2 +- drivers/devfreq/event/exynos-ppmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Can someone apply this please.
Quoted 30 lines
drivers/devfreq/devfreq-event.c +1
-1@@ -240,7 +240,7 @@ struct devfreq_event_dev *devfreq_event_get_edev_by_phandle(struct device *dev, }list_for_each_entry (edev, &devfreq_event_list, node) { -if (!strcmp (edev->desc->name, node->name)) +if (of_node_name_eq (node, edev->desc->name)) goto out; } edev =NULL ;drivers/devfreq/event/exynos-ppmu.c +1
-2@@ -529,7 +529,7 @@ static int of_get_devfreq_events(struct device_node *np,if (!ppmu_events[i].name)continue ; -if (!of_node_cmp (node->name, ppmu_events[i].name)) +if (of_node_name_eq (node, ppmu_events[i].name))break ; } --2.19.1
Chanwoo Choi
maintainerHi Rob,
Quoted 23 lines · Rob Herring
Quoted 17 lines · Rob Herring
Convert string compares of DT node names to use
of_node_name_eqhelper instead. This removes direct access to the node name pointer.For instances using
of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which all of these are.Cc Chanwoo Choi <[email protected]>Cc MyungJoo Ham <[email protected]>Cc Kyungmin Park <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Signed-off-by Rob Herring <[email protected]>Quoted 4 lines
--- drivers/devfreq/devfreq-event.c | 2 +- drivers/devfreq/event/exynos-ppmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Quoted 1 line
Can someone apply this please.
Myungjoo picked up this patch[1] on devfreq.git
but has not yet sent the pull request.
Quoted 33 lines
Quoted 31 lines
drivers/devfreq/devfreq-event.c +1
-1@@ -240,7 +240,7 @@ struct devfreq_event_dev *devfreq_event_get_edev_by_phandle(struct device *dev, }list_for_each_entry (edev, &devfreq_event_list, node) { -if (!strcmp (edev->desc->name, node->name)) +if (of_node_name_eq (node, edev->desc->name)) goto out; } edev =NULL ;drivers/devfreq/event/exynos-ppmu.c +1
-2@@ -529,7 +529,7 @@ static int of_get_devfreq_events(struct device_node *np,if (!ppmu_events[i].name)continue ; -if (!of_node_cmp (node->name, ppmu_events[i].name)) +if (of_node_name_eq (node, ppmu_events[i].name))break ; } --2.19.1
Signature · 3 lines
Best Regards, Chanwoo Choi Samsung Electronics
Quoted 27 lines · Chanwoo Choi
Hi Rob,
Quoted 23 lines · Rob Herring
Quoted 21 lines · Rob Herring
Convert string compares of DT node names to use
of_node_name_eqhelper instead. This removes direct access to the node name pointer.For instances using
of_node_cmp, this has the side effect of now using case sensitive comparisons. This should not matter for any FDT based system which all of these are.Cc Chanwoo Choi <[email protected]>Cc MyungJoo Ham <[email protected]>Cc Kyungmin Park <[email protected]>Cc Kukjin Kim <[email protected]>Cc Krzysztof Kozlowski <[email protected]>Signed-off-by Rob Herring <[email protected]>--- drivers/devfreq/devfreq-event.c | 2 +- drivers/devfreq/event/exynos-ppmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Quoted 4 lines
Quoted 1 line
Can someone apply this please.
Myungjoo picked up this patch[1] on devfreq.git
but has not yet sent the pull request.
Okay, thanks.
Please add that tree to linux-next or reply to patches when they've been applied, so submitters have some way to know when their patch is accepted.
Rob