Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dmaengine: fsl_raid: Simplify with scoped for each OF child loop

Use scoped for-each loop when iterating over device nodes to make code a
bit simpler.

Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260109-of-for-each-compatible-scoped-v3-10-c22fa2c0749a@oss.qualcomm.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Rob Herring (Arm)
69c8cbb4 122b6c28

+1 -3
+1 -3
drivers/dma/fsl_raid.c
··· 746 746 static int fsl_re_probe(struct platform_device *ofdev) 747 747 { 748 748 struct fsl_re_drv_private *re_priv; 749 - struct device_node *np; 750 749 struct device_node *child; 751 750 u32 off; 752 751 u8 ridx = 0; ··· 822 823 dev_set_drvdata(dev, re_priv); 823 824 824 825 /* Parse Device tree to find out the total number of JQs present */ 825 - for_each_compatible_node(np, NULL, "fsl,raideng-v1.0-job-queue") { 826 + for_each_compatible_node_scoped(np, NULL, "fsl,raideng-v1.0-job-queue") { 826 827 rc = of_property_read_u32(np, "reg", &off); 827 828 if (rc) { 828 829 dev_err(dev, "Reg property not found in JQ node\n"); 829 - of_node_put(np); 830 830 return -ENODEV; 831 831 } 832 832 /* Find out the Job Rings present under each JQ */