lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dd09f9d2c05153b9a5e7819acfeefde9428ac1f2.camel@baylibre.com>
Date:   Mon, 17 Jun 2019 16:49:36 +0200
From:   Jerome Brunet <jbrunet@...libre.com>
To:     Geert Uytterhoeven <geert+renesas@...der.be>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>
Cc:     linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] clk: Simplify clk_core_can_round()

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@...der.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@...libre.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ