linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: qcom: clk-branch: Use true and false for boolean values
@ 2018-08-05  0:22 Gustavo A. R. Silva
  2018-08-30 22:19 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-05  0:22 UTC (permalink / raw)
  To: Andy Gross, David Brown, Michael Turquette, Stephen Boyd
  Cc: linux-arm-msm, linux-soc, linux-clk, linux-kernel,
	Gustavo A. R. Silva

Return statements in functions returning bool should use true or false
instead of an integer value.

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/clk/qcom/clk-branch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/qcom/clk-branch.c b/drivers/clk/qcom/clk-branch.c
index bc2205c..99446bf 100644
--- a/drivers/clk/qcom/clk-branch.c
+++ b/drivers/clk/qcom/clk-branch.c
@@ -18,7 +18,7 @@ static bool clk_branch_in_hwcg_mode(const struct clk_branch *br)
 	u32 val;
 
 	if (!br->hwcg_reg)
-		return 0;
+		return false;
 
 	regmap_read(br->clkr.regmap, br->hwcg_reg, &val);
 
-- 
2.7.4

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

* Re: [PATCH] clk: qcom: clk-branch: Use true and false for boolean values
  2018-08-05  0:22 [PATCH] clk: qcom: clk-branch: Use true and false for boolean values Gustavo A. R. Silva
@ 2018-08-30 22:19 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2018-08-30 22:19 UTC (permalink / raw)
  To: Andy Gross, David Brown, Michael Turquette
  Cc: linux-arm-msm, linux-soc, linux-clk, linux-kernel,
	Gustavo A. R. Silva

Quoting Gustavo A. R. Silva (2018-08-04 17:22:22)
> Return statements in functions returning bool should use true or false
> instead of an integer value.
> 
> This code was detected with the help of Coccinelle.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> ---

Applied to clk-next

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

end of thread, other threads:[~2018-08-30 22:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-05  0:22 [PATCH] clk: qcom: clk-branch: Use true and false for boolean values Gustavo A. R. Silva
2018-08-30 22:19 ` Stephen Boyd

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).