Skip to contentSkip to conversation

clk:sophgo:clk-cv18xx-pll: fix unitialized u32 variable

PATCH In review Ragavendra 2 participants 3 messages Nov 13, 2024 – Nov 14, 2024

Subsystems (2)
lore
Share & tools
lore

Ragavendra

author
#0 lore raw

PATCH 1/1 clk:sophgo:clk-cv18xx-pll: fix unitialized u32 variable

Initializing the val variable of type u32 as it was not initialized.

Fixes 80fd61ec4612 ("clk: sophgo: Add clock support for CV1800 SoC")
---
 drivers/clk/sophgo/clk-cv18xx-pll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/sophgo/clk-cv18xx-pll.c +1 -1
index 29e24098bf5f..04a0419cab4e 100644
@@ -87,7 +87,7 @@ static int ipll_find_rate(const struct cv1800_clk_pll_limit *limit,
 
 static int ipll_determine_rate(struct clk_hw *hw, struct clk_rate_request *req)
 {
-	u32 val;
+	u32 val = 0;
 	struct cv1800_clk_pll *pll = hw_to_cv1800_clk_pll(hw);
 
 	return ipll_find_rate(pll->pll_limit, req->best_parent_rate,
Signature · 1 line
2.46.1
#1 lore raw

Hi, Ragavendra,

This patch should be dropped, right? I see a new patch https://lore.kernel.org/linux-clk/[email protected]/ should have covered this.

Suggest you reply this patch email and declare the dropping to avoid confusion.

Quoted 21 lines · Ragavendra

Initializing the val variable of type u32 as it was not initialized.

Fixes 80fd61ec4612 ("clk: sophgo: Add clock support for CV1800 SoC")
---
  drivers/clk/sophgo/clk-cv18xx-pll.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/sophgo/clk-cv18xx-pll.c +1 -1
index 29e24098bf5f..04a0419cab4e 100644
@@ -87,7 +87,7 @@ static int ipll_find_rate(const struct cv1800_clk_pll_limit *limit,
 
  static int ipll_determine_rate(struct clk_hw *hw, struct clk_rate_request *req)
  {
-	u32 val;
+	u32 val = 0;
  	struct cv1800_clk_pll *pll = hw_to_cv1800_clk_pll(hw);
 
  	return ipll_find_rate(pll->pll_limit, req->best_parent_rate,
#2 lore raw
Quoted 17 lines · Chen Wang

Hi, Ragavendra,

This patch should be dropped, right? I see a new patch https://lore.kernel.org/linux-clk/[email protected]/
should have covered this.

Suggest you reply this patch email and declare the dropping to avoid confusion.

Quoted 8 lines · Ragavendra

Initializing the val variable of type u32 as it was not initialized.

Fixes 80fd61ec4612 ("clk: sophgo: Add clock support for CV1800 SoC")
---
  drivers/clk/sophgo/clk-cv18xx-pll.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 11 lines

drivers/clk/sophgo/clk-cv18xx-pll.c static int ipll_find_rate(const struct cv1800_clk_pll_limit *limit, · line 91

Quoted 11 lines
drivers/clk/sophgo/clk-cv18xx-pll.c +1 -1
index 29e24098bf5f..04a0419cab4e 100644
@@ -87,7 +87,7 @@ static int ipll_find_rate(const struct cv1800_clk_pll_limit *limit,
  static int ipll_determine_rate(struct clk_hw *hw, struct clk_rate_request *req)
  {
-	u32 val;
+	u32 val = 0;
  	struct cv1800_clk_pll *pll = hw_to_cv1800_clk_pll(hw);
  	return ipll_find_rate(pll->pll_limit, req->best_parent_rate,

hi Chen,
You are correct, please drop this patch email.

--
Yours sincerely,
Ragavendra N