All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: imx: clk-sscg-pll: Drop unnecessary initialization
@ 2020-02-21  6:59 ` Anson Huang
  0 siblings, 0 replies; 6+ messages in thread
From: Anson Huang @ 2020-02-21  6:59 UTC (permalink / raw
  To: mturquette, sboyd, shawnguo, s.hauer, kernel, festevam, abel.vesa,
	john, heiko, jonas.gorski, linux-clk, linux-arm-kernel,
	linux-kernel
  Cc: Linux-imx

No need to initialize 'ret' in many functions, as it will get
the return value from function call, so remove the initializtion
of 'ret'.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/clk/imx/clk-sscg-pll.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/clk/imx/clk-sscg-pll.c b/drivers/clk/imx/clk-sscg-pll.c
index acd1b90..d4a2be1 100644
--- a/drivers/clk/imx/clk-sscg-pll.c
+++ b/drivers/clk/imx/clk-sscg-pll.c
@@ -195,10 +195,10 @@ static int clk_sscg_pll2_find_setup(struct clk_sscg_pll_setup *setup,
 					uint64_t ref)
 {
 
-	int ret = -EINVAL;
+	int ret;
 
 	if (ref < PLL_STAGE1_MIN_FREQ || ref > PLL_STAGE1_MAX_FREQ)
-		return ret;
+		return -EINVAL;
 
 	temp_setup->vco1 = ref;
 
@@ -254,10 +254,10 @@ static int clk_sscg_pll1_find_setup(struct clk_sscg_pll_setup *setup,
 					uint64_t ref)
 {
 
-	int ret = -EINVAL;
+	int ret;
 
 	if (ref < PLL_REF_MIN_FREQ || ref > PLL_REF_MAX_FREQ)
-		return ret;
+		return -EINVAL;
 
 	temp_setup->ref = ref;
 
@@ -428,7 +428,7 @@ static int __clk_sscg_pll_determine_rate(struct clk_hw *hw,
 	struct clk_sscg_pll_setup *setup = &pll->setup;
 	struct clk_hw *parent_hw = NULL;
 	int bypass_parent_index;
-	int ret = -EINVAL;
+	int ret;
 
 	req->max_rate = max;
 	req->min_rate = min;
@@ -467,10 +467,10 @@ static int clk_sscg_pll_determine_rate(struct clk_hw *hw,
 	uint64_t rate = req->rate;
 	uint64_t min = req->min_rate;
 	uint64_t max = req->max_rate;
-	int ret = -EINVAL;
+	int ret;
 
 	if (rate < PLL_OUT_MIN_FREQ || rate > PLL_OUT_MAX_FREQ)
-		return ret;
+		return -EINVAL;
 
 	ret = __clk_sscg_pll_determine_rate(hw, req, req->rate, req->rate,
 						rate, PLL_BYPASS2);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] clk: imx: clk-sscg-pll: Drop unnecessary initialization
@ 2020-02-21  6:59 ` Anson Huang
  0 siblings, 0 replies; 6+ messages in thread
From: Anson Huang @ 2020-02-21  6:59 UTC (permalink / raw
  To: mturquette, sboyd, shawnguo, s.hauer, kernel, festevam, abel.vesa,
	john, heiko, jonas.gorski, linux-clk, linux-arm-kernel,
	linux-kernel
  Cc: Linux-imx

No need to initialize 'ret' in many functions, as it will get
the return value from function call, so remove the initializtion
of 'ret'.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/clk/imx/clk-sscg-pll.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/clk/imx/clk-sscg-pll.c b/drivers/clk/imx/clk-sscg-pll.c
index acd1b90..d4a2be1 100644
--- a/drivers/clk/imx/clk-sscg-pll.c
+++ b/drivers/clk/imx/clk-sscg-pll.c
@@ -195,10 +195,10 @@ static int clk_sscg_pll2_find_setup(struct clk_sscg_pll_setup *setup,
 					uint64_t ref)
 {
 
-	int ret = -EINVAL;
+	int ret;
 
 	if (ref < PLL_STAGE1_MIN_FREQ || ref > PLL_STAGE1_MAX_FREQ)
-		return ret;
+		return -EINVAL;
 
 	temp_setup->vco1 = ref;
 
@@ -254,10 +254,10 @@ static int clk_sscg_pll1_find_setup(struct clk_sscg_pll_setup *setup,
 					uint64_t ref)
 {
 
-	int ret = -EINVAL;
+	int ret;
 
 	if (ref < PLL_REF_MIN_FREQ || ref > PLL_REF_MAX_FREQ)
-		return ret;
+		return -EINVAL;
 
 	temp_setup->ref = ref;
 
@@ -428,7 +428,7 @@ static int __clk_sscg_pll_determine_rate(struct clk_hw *hw,
 	struct clk_sscg_pll_setup *setup = &pll->setup;
 	struct clk_hw *parent_hw = NULL;
 	int bypass_parent_index;
-	int ret = -EINVAL;
+	int ret;
 
 	req->max_rate = max;
 	req->min_rate = min;
@@ -467,10 +467,10 @@ static int clk_sscg_pll_determine_rate(struct clk_hw *hw,
 	uint64_t rate = req->rate;
 	uint64_t min = req->min_rate;
 	uint64_t max = req->max_rate;
-	int ret = -EINVAL;
+	int ret;
 
 	if (rate < PLL_OUT_MIN_FREQ || rate > PLL_OUT_MAX_FREQ)
-		return ret;
+		return -EINVAL;
 
 	ret = __clk_sscg_pll_determine_rate(hw, req, req->rate, req->rate,
 						rate, PLL_BYPASS2);
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] clk: imx: clk-sscg-pll: Drop unnecessary initialization
  2020-02-21  6:59 ` Anson Huang
@ 2020-02-21 23:57   ` Stephen Boyd
  -1 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2020-02-21 23:57 UTC (permalink / raw
  To: Anson Huang, abel.vesa, festevam, heiko, john, jonas.gorski,
	kernel, linux-arm-kernel, linux-clk, linux-kernel, mturquette,
	s.hauer, shawnguo
  Cc: Linux-imx

Quoting Anson Huang (2020-02-20 22:59:36)
> No need to initialize 'ret' in many functions, as it will get
> the return value from function call, so remove the initializtion
> of 'ret'.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---

Reviewed-by: Stephen Boyd <sboyd@kernel.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] clk: imx: clk-sscg-pll: Drop unnecessary initialization
@ 2020-02-21 23:57   ` Stephen Boyd
  0 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2020-02-21 23:57 UTC (permalink / raw
  To: Anson Huang, abel.vesa, festevam, heiko, john, jonas.gorski,
	kernel, linux-arm-kernel, linux-clk, linux-kernel, mturquette,
	s.hauer, shawnguo
  Cc: Linux-imx

Quoting Anson Huang (2020-02-20 22:59:36)
> No need to initialize 'ret' in many functions, as it will get
> the return value from function call, so remove the initializtion
> of 'ret'.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---

Reviewed-by: Stephen Boyd <sboyd@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] clk: imx: clk-sscg-pll: Drop unnecessary initialization
  2020-02-21  6:59 ` Anson Huang
@ 2020-02-24  7:49   ` Shawn Guo
  -1 siblings, 0 replies; 6+ messages in thread
From: Shawn Guo @ 2020-02-24  7:49 UTC (permalink / raw
  To: Anson Huang
  Cc: mturquette, sboyd, s.hauer, kernel, festevam, abel.vesa, john,
	heiko, jonas.gorski, linux-clk, linux-arm-kernel, linux-kernel,
	Linux-imx

On Fri, Feb 21, 2020 at 02:59:36PM +0800, Anson Huang wrote:
> No need to initialize 'ret' in many functions, as it will get
> the return value from function call, so remove the initializtion
> of 'ret'.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] clk: imx: clk-sscg-pll: Drop unnecessary initialization
@ 2020-02-24  7:49   ` Shawn Guo
  0 siblings, 0 replies; 6+ messages in thread
From: Shawn Guo @ 2020-02-24  7:49 UTC (permalink / raw
  To: Anson Huang
  Cc: abel.vesa, sboyd, mturquette, jonas.gorski, linux-kernel,
	linux-clk, Linux-imx, kernel, john, festevam, s.hauer,
	linux-arm-kernel, heiko

On Fri, Feb 21, 2020 at 02:59:36PM +0800, Anson Huang wrote:
> No need to initialize 'ret' in many functions, as it will get
> the return value from function call, so remove the initializtion
> of 'ret'.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Applied, thanks.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-02-24  7:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-21  6:59 [PATCH] clk: imx: clk-sscg-pll: Drop unnecessary initialization Anson Huang
2020-02-21  6:59 ` Anson Huang
2020-02-21 23:57 ` Stephen Boyd
2020-02-21 23:57   ` Stephen Boyd
2020-02-24  7:49 ` Shawn Guo
2020-02-24  7:49   ` Shawn Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.