All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: Simplify clk_core_can_round()
@ 2019-06-17 12:02 Geert Uytterhoeven
  2019-06-17 14:49 ` Jerome Brunet
  2019-06-25 21:50 ` Stephen Boyd
  0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2019-06-17 12:02 UTC (permalink / raw)
  To: Jerome Brunet, Michael Turquette, Stephen Boyd
  Cc: linux-clk, linux-kernel, Geert Uytterhoeven

A boolean expression already evaluates to true or false, so there is no
need to check the result and return true or false explicitly.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/clk/clk.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index aa51756fd4d695b3..c68bc5f695912bf5 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -1324,10 +1324,7 @@ static void clk_core_init_rate_req(struct clk_core * const core,
 
 static bool clk_core_can_round(struct clk_core * const core)
 {
-	if (core->ops->determine_rate || core->ops->round_rate)
-		return true;
-
-	return false;
+	return core->ops->determine_rate || core->ops->round_rate;
 }
 
 static int clk_core_round_rate_nolock(struct clk_core *core,
-- 
2.17.1


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

* Re: [PATCH] clk: Simplify clk_core_can_round()
  2019-06-17 12:02 [PATCH] clk: Simplify clk_core_can_round() Geert Uytterhoeven
@ 2019-06-17 14:49 ` Jerome Brunet
  2019-06-25 21:50 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Jerome Brunet @ 2019-06-17 14:49 UTC (permalink / raw)
  To: Geert Uytterhoeven, Michael Turquette, Stephen Boyd
  Cc: linux-clk, linux-kernel

On Mon, 2019-06-17 at 14:02 +0200, Geert Uytterhoeven wrote:
> A boolean expression already evaluates to true or false, so there is no
> need to check the result and return true or false explicitly.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/clk/clk.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index aa51756fd4d695b3..c68bc5f695912bf5 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -1324,10 +1324,7 @@ static void clk_core_init_rate_req(struct clk_core * const core,
>  
>  static bool clk_core_can_round(struct clk_core * const core)
>  {
> -	if (core->ops->determine_rate || core->ops->round_rate)
> -		return true;
> -
> -	return false;
> +	return core->ops->determine_rate || core->ops->round_rate;
>  }
>  
>  static int clk_core_round_rate_nolock(struct clk_core *core,

Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>


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

* Re: [PATCH] clk: Simplify clk_core_can_round()
  2019-06-17 12:02 [PATCH] clk: Simplify clk_core_can_round() Geert Uytterhoeven
  2019-06-17 14:49 ` Jerome Brunet
@ 2019-06-25 21:50 ` Stephen Boyd
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Boyd @ 2019-06-25 21:50 UTC (permalink / raw)
  To: Geert Uytterhoeven, Jerome Brunet, Michael Turquette
  Cc: linux-clk, linux-kernel, Geert Uytterhoeven

Quoting Geert Uytterhoeven (2019-06-17 05:02:48)
> A boolean expression already evaluates to true or false, so there is no
> need to check the result and return true or false explicitly.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---

Applied to clk-next


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

end of thread, other threads:[~2019-06-25 21:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 12:02 [PATCH] clk: Simplify clk_core_can_round() Geert Uytterhoeven
2019-06-17 14:49 ` Jerome Brunet
2019-06-25 21:50 ` Stephen Boyd

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.