[PATCH 2/7] clk: st: clkgen-pll: Rename some variables in clkgen_c32_pll_setup()

Haoxiang Li posted 7 patches 3 weeks, 3 days ago
There is a newer version of this series
[PATCH 2/7] clk: st: clkgen-pll: Rename some variables in clkgen_c32_pll_setup()
Posted by Haoxiang Li 3 weeks, 3 days ago
In clkgen_c32_pll_setup(), `clk` is used for two distint variables' name.
This patch rename the preceding `clk` to `pll_clk`.
The rename is in preparation for cleaning up some memory leaks.

Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
---
 drivers/clk/st/clkgen-pll.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/clk/st/clkgen-pll.c b/drivers/clk/st/clkgen-pll.c
index a7d605b52cf3..0390f6834a0d 100644
--- a/drivers/clk/st/clkgen-pll.c
+++ b/drivers/clk/st/clkgen-pll.c
@@ -755,11 +755,10 @@ static struct clk * __init clkgen_odf_register(const char *parent_name,
 	return clk;
 }
 
-
 static void __init clkgen_c32_pll_setup(struct device_node *np,
 		struct clkgen_pll_data_clks *datac)
 {
-	struct clk *clk;
+	struct clk *pll_clk;
 	const char *parent_name, *pll_name;
 	void __iomem *pll_base;
 	int num_odfs, odf;
@@ -777,12 +776,12 @@ static void __init clkgen_c32_pll_setup(struct device_node *np,
 
 	of_clk_detect_critical(np, 0, &pll_flags);
 
-	clk = clkgen_pll_register(parent_name, datac->data, pll_base, pll_flags,
+	pll_clk = clkgen_pll_register(parent_name, datac->data, pll_base, pll_flags,
 				  np->name, datac->data->lock);
-	if (IS_ERR(clk))
 		return;
+	if (IS_ERR(pll_clk))
 
-	pll_name = __clk_get_name(clk);
+	pll_name = __clk_get_name(pll_clk);
 
 	num_odfs = datac->data->num_odfs;
 
-- 
2.25.1
Re: [PATCH 2/7] clk: st: clkgen-pll: Rename some variables in clkgen_c32_pll_setup()
Posted by Markus Elfring 3 weeks, 2 days ago
> In clkgen_c32_pll_setup(), `clk` is used for two distint variables' name.

                                                   distinct variable names?


> This patch rename …

See also once more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.19-rc5#n94

Regards,
Markus
Re: [PATCH 2/7] clk: st: clkgen-pll: Rename some variables in clkgen_c32_pll_setup()
Posted by Brian Masney 3 weeks, 3 days ago
On Fri, Jan 16, 2026 at 07:38:42PM +0800, Haoxiang Li wrote:
> In clkgen_c32_pll_setup(), `clk` is used for two distint variables' name.
> This patch rename the preceding `clk` to `pll_clk`.
> The rename is in preparation for cleaning up some memory leaks.
> 
> Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>

Reviewed-by: Brian Masney <bmasney@redhat.com>