* [PATCH] clk: rockchip: Remove redundant null check before clk_prepare_enable
@ 2020-11-27 9:05 Xu Wang
2020-11-27 19:56 ` Stephen Boyd
2020-11-30 1:51 ` Heiko Stuebner
0 siblings, 2 replies; 3+ messages in thread
From: Xu Wang @ 2020-11-27 9:05 UTC (permalink / raw)
To: mturquette, sboyd, heiko, linux-clk, linux-arm-kernel, linux-rockchip
Cc: linux-kernel
Because clk_prepare_enable() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.
Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
drivers/clk/rockchip/clk.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c
index b443169dd408..336481bc6cc7 100644
--- a/drivers/clk/rockchip/clk.c
+++ b/drivers/clk/rockchip/clk.c
@@ -603,8 +603,7 @@ void rockchip_clk_protect_critical(const char *const clocks[],
for (i = 0; i < nclocks; i++) {
struct clk *clk = __clk_lookup(clocks[i]);
- if (clk)
- clk_prepare_enable(clk);
+ clk_prepare_enable(clk);
}
}
EXPORT_SYMBOL_GPL(rockchip_clk_protect_critical);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: rockchip: Remove redundant null check before clk_prepare_enable
2020-11-27 9:05 [PATCH] clk: rockchip: Remove redundant null check before clk_prepare_enable Xu Wang
@ 2020-11-27 19:56 ` Stephen Boyd
2020-11-30 1:51 ` Heiko Stuebner
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2020-11-27 19:56 UTC (permalink / raw)
To: Xu Wang, heiko, linux-arm-kernel, linux-clk, linux-rockchip, mturquette
Cc: linux-kernel
Quoting Xu Wang (2020-11-27 01:05:51)
> Because clk_prepare_enable() already checked NULL clock parameter,
> so the additional check is unnecessary, just remove it.
>
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
> ---
Acked-by: Stephen Boyd <sboyd@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: rockchip: Remove redundant null check before clk_prepare_enable
2020-11-27 9:05 [PATCH] clk: rockchip: Remove redundant null check before clk_prepare_enable Xu Wang
2020-11-27 19:56 ` Stephen Boyd
@ 2020-11-30 1:51 ` Heiko Stuebner
1 sibling, 0 replies; 3+ messages in thread
From: Heiko Stuebner @ 2020-11-30 1:51 UTC (permalink / raw)
To: Xu Wang, linux-arm-kernel, mturquette, linux-rockchip, sboyd, linux-clk
Cc: Heiko Stuebner, linux-kernel
On Fri, 27 Nov 2020 09:05:51 +0000, Xu Wang wrote:
> Because clk_prepare_enable() already checked NULL clock parameter,
> so the additional check is unnecessary, just remove it.
Applied, thanks!
[1/1] clk: rockchip: Remove redundant null check before clk_prepare_enable
commit: 7f5b57a095f3b9532793d143655e83433bb448af
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-30 1:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-27 9:05 [PATCH] clk: rockchip: Remove redundant null check before clk_prepare_enable Xu Wang
2020-11-27 19:56 ` Stephen Boyd
2020-11-30 1:51 ` Heiko Stuebner
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).