Message ID | 20200914061411.3356-1-miaoqinglang@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 8f7e57e8e29c4fc788811dd4db96126272b8df91 |
Headers | show |
Series | [-next] macintosh: windfarm: use for_each_child_of_node() macro | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (4b552a4cbf286ff9dcdab19153f3c1c7d1680fab) |
snowpatch_ozlabs/build-ppc64le | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/build-ppc64be | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/build-ppc64e | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/build-pmac32 | warning | Upstream build failed, couldn't test patch |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 9 lines checked |
snowpatch_ozlabs/needsstable | success | Patch has no Fixes tags |
On Mon, 14 Sep 2020 14:14:11 +0800, Qinglang Miao wrote:
> Use for_each_child_of_node() macro instead of open coding it.
Applied to powerpc/next.
[1/1] macintosh: windfarm: use for_each_child_of_node() macro
https://git.kernel.org/powerpc/c/8f7e57e8e29c4fc788811dd4db96126272b8df91
cheers
diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c index cb75dc035..e46e1153a 100644 --- a/drivers/macintosh/windfarm_smu_sat.c +++ b/drivers/macintosh/windfarm_smu_sat.c @@ -216,8 +216,7 @@ static int wf_sat_probe(struct i2c_client *client, vsens[0] = vsens[1] = -1; isens[0] = isens[1] = -1; - child = NULL; - while ((child = of_get_next_child(dev, child)) != NULL) { + for_each_child_of_node(dev, child) { reg = of_get_property(child, "reg", NULL); loc = of_get_property(child, "location", NULL); if (reg == NULL || loc == NULL)
Use for_each_child_of_node() macro instead of open coding it. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> --- drivers/macintosh/windfarm_smu_sat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)