linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] clk: imx: gate2: Remove unused variable ret
@ 2020-11-03 11:32 Zou Wei
  2020-11-05  1:32 ` Stephen Boyd
  2020-11-10  1:09 ` Shawn Guo
  0 siblings, 2 replies; 3+ messages in thread
From: Zou Wei @ 2020-11-03 11:32 UTC (permalink / raw)
  To: mturquette, sboyd, shawnguo, s.hauer, kernel, festevam, linux-imx
  Cc: linux-clk, linux-arm-kernel, linux-kernel, Zou Wei

This patch fixes below warning reported by coccicheck:

./clk-gate2.c:57:5-8: Unneeded variable: "ret". Return "0" on line 68

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
---
 drivers/clk/imx/clk-gate2.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/clk/imx/clk-gate2.c b/drivers/clk/imx/clk-gate2.c
index 480a184..f16c401 100644
--- a/drivers/clk/imx/clk-gate2.c
+++ b/drivers/clk/imx/clk-gate2.c
@@ -54,7 +54,6 @@ static int clk_gate2_enable(struct clk_hw *hw)
 {
 	struct clk_gate2 *gate = to_clk_gate2(hw);
 	unsigned long flags;
-	int ret = 0;
 
 	spin_lock_irqsave(gate->lock, flags);
 
@@ -65,7 +64,7 @@ static int clk_gate2_enable(struct clk_hw *hw)
 out:
 	spin_unlock_irqrestore(gate->lock, flags);
 
-	return ret;
+	return 0;
 }
 
 static void clk_gate2_disable(struct clk_hw *hw)
-- 
2.6.2


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

* Re: [PATCH -next] clk: imx: gate2: Remove unused variable ret
  2020-11-03 11:32 [PATCH -next] clk: imx: gate2: Remove unused variable ret Zou Wei
@ 2020-11-05  1:32 ` Stephen Boyd
  2020-11-10  1:09 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2020-11-05  1:32 UTC (permalink / raw)
  To: Zou Wei, festevam, kernel, linux-imx, mturquette, s.hauer, shawnguo
  Cc: linux-clk, linux-arm-kernel, linux-kernel, Zou Wei

Quoting Zou Wei (2020-11-03 03:32:14)
> This patch fixes below warning reported by coccicheck:
> 
> ./clk-gate2.c:57:5-8: Unneeded variable: "ret". Return "0" on line 68
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zou Wei <zou_wei@huawei.com>
> ---

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

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

* Re: [PATCH -next] clk: imx: gate2: Remove unused variable ret
  2020-11-03 11:32 [PATCH -next] clk: imx: gate2: Remove unused variable ret Zou Wei
  2020-11-05  1:32 ` Stephen Boyd
@ 2020-11-10  1:09 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2020-11-10  1:09 UTC (permalink / raw)
  To: Zou Wei
  Cc: mturquette, sboyd, s.hauer, kernel, festevam, linux-imx,
	linux-clk, linux-arm-kernel, linux-kernel

On Tue, Nov 03, 2020 at 07:32:14PM +0800, Zou Wei wrote:
> This patch fixes below warning reported by coccicheck:
> 
> ./clk-gate2.c:57:5-8: Unneeded variable: "ret". Return "0" on line 68
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Zou Wei <zou_wei@huawei.com>

Applied, thanks.

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

end of thread, other threads:[~2020-11-10  1:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03 11:32 [PATCH -next] clk: imx: gate2: Remove unused variable ret Zou Wei
2020-11-05  1:32 ` Stephen Boyd
2020-11-10  1:09 ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).