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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 18 Feb 2019 10:29:45 +0530
From:   Viresh Kumar <viresh.kumar@...aro.org>
To:     Yangtao Li <tiny.windzz@...il.com>
Cc:     rjw@...ysocki.net, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cpufreq: speedstep: convert BUG() to BUG_ON()

On 16-02-19, 11:15, Yangtao Li wrote:
> To fix coccinelle WARNING.
> 
> WARNING: Use BUG_ON instead of if condition followed by BUG.
> 
> Signed-off-by: Yangtao Li <tiny.windzz@...il.com>
> ---
>  drivers/cpufreq/speedstep-ich.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/cpufreq/speedstep-ich.c b/drivers/cpufreq/speedstep-ich.c
> index fbbcb88db061..5d8a09b82efb 100644
> --- a/drivers/cpufreq/speedstep-ich.c
> +++ b/drivers/cpufreq/speedstep-ich.c
> @@ -243,8 +243,7 @@ static unsigned int speedstep_get(unsigned int cpu)
>  	unsigned int speed;
>  
>  	/* You're supposed to ensure CPU is online. */
> -	if (smp_call_function_single(cpu, get_freq_data, &speed, 1) != 0)
> -		BUG();
> +	BUG_ON(smp_call_function_single(cpu, get_freq_data, &speed, 1));
>  
>  	pr_debug("detected %u kHz as current frequency\n", speed);
>  	return speed;

Applied. Thanks.

-- 
viresh

Powered by blists - more mailing lists