Skip to content

Commit ae039f0

Browse files
Yihao Hanbebarino
authored andcommitted
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 <hanyihao@vivo.com> Link: https://lore.kernel.org/r/20220408130617.14963-1-hanyihao@vivo.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 7942ac9 commit ae039f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/clk/clk-xgene.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,10 +522,10 @@ static int xgene_clk_is_enabled(struct clk_hw *hw)
522522
pr_debug("%s clock is %s\n", clk_hw_get_name(hw),
523523
data & pclk->param.reg_clk_mask ? "enabled" :
524524
"disabled");
525+
} else {
526+
return 1;
525527
}
526528

527-
if (!pclk->param.csr_reg)
528-
return 1;
529529
return data & pclk->param.reg_clk_mask ? 1 : 0;
530530
}
531531

0 commit comments

Comments
 (0)