From: Yihao Han Date: Fri, 8 Apr 2022 13:06:09 +0000 (-0700) Subject: clk: clk-xgene: simplify if-if to if-else X-Git-Tag: v6.1-rc5~153^2~8^4~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae039f0fc0432922e95888cb470e5d9e1d8f6934;p=platform%2Fkernel%2Flinux-starfive.git clk: clk-xgene: simplify if-if to if-else Replace `if (!pclk->param.csr_reg)` with `else` for simplification and add curly brackets according to the kernel coding style: "Do not unnecessarily use braces where a single statement will do." ... "This does not apply if only one branch of a conditional statement is a single statement; in the latter case use braces in both branches" Please refer to: https://www.kernel.org/doc/html/v5.17-rc8/process/coding-style.html Signed-off-by: Yihao Han Link: https://lore.kernel.org/r/20220408130617.14963-1-hanyihao@vivo.com Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/clk-xgene.c b/drivers/clk/clk-xgene.c index 857217c..0c3d0ce 100644 --- a/drivers/clk/clk-xgene.c +++ b/drivers/clk/clk-xgene.c @@ -522,10 +522,10 @@ static int xgene_clk_is_enabled(struct clk_hw *hw) pr_debug("%s clock is %s\n", clk_hw_get_name(hw), data & pclk->param.reg_clk_mask ? "enabled" : "disabled"); + } else { + return 1; } - if (!pclk->param.csr_reg) - return 1; return data & pclk->param.reg_clk_mask ? 1 : 0; }