summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2022-05-04 11:38:32 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2022-05-04 11:38:32 +0200
commit2656d3ff4f66675cfec482982189ae6cd7d0f425 (patch)
tree21e768cd9e5e2493394693253869dba15104979a /arch/powerpc/platforms
parentpowerpc/4xx/cpm: Fix return value of __setup() handler (diff)
downloadlinux-2656d3ff4f66675cfec482982189ae6cd7d0f425.tar.xz
linux-2656d3ff4f66675cfec482982189ae6cd7d0f425.zip
powerpc/powermac: Use for_each_property_of_node()
Replace open-coded for loop with for_each_property_of_node(). Reported-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/powermac/pfunc_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c
index 94df0a91b46f..dabd4b3d797e 100644
--- a/arch/powerpc/platforms/powermac/pfunc_core.c
+++ b/arch/powerpc/platforms/powermac/pfunc_core.c
@@ -685,7 +685,7 @@ static int pmf_add_functions(struct pmf_device *dev, void *driverdata)
const int plen = strlen(PP_PREFIX);
int count = 0;
- for (pp = dev->node->properties; pp != 0; pp = pp->next) {
+ for_each_property_of_node(dev->node, pp) {
const char *name;
if (strncmp(pp->name, PP_PREFIX, plen) != 0)
continue;