From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 87DD2170836; Wed, 3 Jul 2024 12:22:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720009326; cv=none; b=U6zj5KqprfpY+EhQNyENymP5dybWeSALcuqCGXECz2LvBPEdlBn7Lhc7wrA52+RdqGpAJCBZVbXZotCi8NDmtQw2qdCoXt7V7aPICn75dMfebsd2WwbPL2gsrSmydJwPEcSsq/40P3D5EAayjXZr+BMsJE2/Cs+8eq/VwfZnIQE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720009326; c=relaxed/simple; bh=vYuco9/NSRpqebQ4mYUp/0sTq0aoO3JjDyeQJOZxcqs=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=gN4fa1LmimKXZFyT08WDq5IiYMVETjeD5FN2cHTaNzwFEEZMNCHVkMeiI7KIYO69opxr6IbBsQXPZm82YepUvxJXVYtPIlCDZiE2Py3/TPb1gQJUWZ0fHU6a9vhXpk4Aw3kKlGPTg8e/+CCCsPDF9bZ2RS21TN1u6z3STXs8aiE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C0FA3367; Wed, 3 Jul 2024 05:22:27 -0700 (PDT) Received: from donnerap.manchester.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 079283F766; Wed, 3 Jul 2024 05:21:54 -0700 (PDT) Date: Wed, 3 Jul 2024 13:21:52 +0100 From: Andre Przywara To: Luca Ceresoli Cc: Miguel Ojeda , Rob Herring , Saravana Kannan , Nathan Chancellor , Michael Turquette , Stephen Boyd , Tony Lindgren , Bjorn Andersson , Emilio =?UTF-8?B?TMOzcGV6?= , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Krzysztof Kozlowski , Daniel Lezcano , Thomas Gleixner , Florian Fainelli , Broadcom internal kernel review list , Linus Walleij , Bartosz Golaszewski , Jonathan Cameron , Lee Jones , Shawn Guo , Pengutronix Kernel Team , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , Greg Kroah-Hartman , Jiri Slaby , Richard Leitner , Liam Girdwood , Mark Brown , Nicolas Ferre , Michael Ellerman , Nicholas Piggin , Christophe Leroy , "Naveen N. Rao" , Damien Le Moal , "Peng Fan (OSS)" , Thomas Petazzoni , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, llvm@lists.linux.dev, linux-clk@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-iio@vger.kernel.org, linux-pwm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, patches@opensource.cirrus.com, linux-sound@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH 04/20] clk: sunxi: clk-simple-gates: convert to of_property_for_each_u32_new() Message-ID: <20240703132152.6c306a48@donnerap.manchester.arm.com> In-Reply-To: <20240703-of_property_for_each_u32-v1-4-42c1fc0b82aa@bootlin.com> References: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com> <20240703-of_property_for_each_u32-v1-4-42c1fc0b82aa@bootlin.com> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 03 Jul 2024 12:36:48 +0200 Luca Ceresoli wrote: > Simplify code using of_property_for_each_u32_new() as the two additional > parameters in of_property_for_each_u32() are not used here. > > Signed-off-by: Luca Ceresoli Reviewed-by: Andre Przywara Cheers, Andre > --- > drivers/clk/sunxi/clk-simple-gates.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/clk/sunxi/clk-simple-gates.c b/drivers/clk/sunxi/clk-simple-gates.c > index 0399627c226a..a30d14937e0b 100644 > --- a/drivers/clk/sunxi/clk-simple-gates.c > +++ b/drivers/clk/sunxi/clk-simple-gates.c > @@ -21,11 +21,9 @@ static void __init sunxi_simple_gates_setup(struct device_node *node, > { > struct clk_onecell_data *clk_data; > const char *clk_parent, *clk_name; > - struct property *prop; > struct resource res; > void __iomem *clk_reg; > void __iomem *reg; > - const __be32 *p; > int number, i = 0, j; > u8 clk_bit; > u32 index; > @@ -47,7 +45,7 @@ static void __init sunxi_simple_gates_setup(struct device_node *node, > if (!clk_data->clks) > goto err_free_data; > > - of_property_for_each_u32(node, "clock-indices", prop, p, index) { > + of_property_for_each_u32_new(node, "clock-indices", index) { > of_property_read_string_index(node, "clock-output-names", > i, &clk_name); > >