On Wed, Jul 01, 2026 at 03:42:35PM +0300, Matti Vaittinen wrote: > From: Matti Vaittinen > + nproot = of_get_child_by_name(nproot, "regulators"); > + if (!nproot) { > + dev_err(dev, "failed to find regulators node\n"); > + return -ENODEV; > + } > + for_each_child_of_node(nproot, np) { > + if (of_node_name_eq(np, LDO1_NODE_NAME)) > + ldo1_use_high_range = of_property_read_bool(np, > + "rohm,ldo-range-high"); > + if (of_node_name_eq(np, LDO3_NODE_NAME)) > + ldo3_use_high_range = of_property_read_bool(np, > + "rohm,ldo-range-high"); > + } Why do we iterate over all nodes rather than doing additional of_get_child_by_name()s? > + if (ldo1_use_high_range) { > + d[BD73800_LDO1].desc.linear_ranges = bd73800_ldo13_high_volts; > + d[BD73800_LDO1].desc.n_linear_ranges = > + ARRAY_SIZE(bd73800_ldo13_high_volts); > + } > + if (ldo3_use_high_range) { > + d[BD73800_LDO3].desc.linear_ranges = bd73800_ldo13_high_volts; > + d[BD73800_LDO3].desc.n_linear_ranges = > + ARRAY_SIZE(bd73800_ldo13_high_volts); > + } You could just do these updates without the intermediate variables.