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: <b1cb1fd9be34d2fcec2578e06facc4168de4f554.camel@perches.com>
Date:   Tue, 14 Dec 2021 07:24:34 -0800
From:   Joe Perches <joe@...ches.com>
To:     Steven Rostedt <rostedt@...dmis.org>, cgel.zte@...il.com
Cc:     mingo@...hat.com, juri.lelli@...hat.com,
        vincent.guittot@...aro.org, dietmar.eggemann@....com,
        bsegall@...gle.com, mgorman@...e.de, bristot@...hat.com,
        linux-kernel@...r.kernel.org,
        Changcheng Deng <deng.changcheng@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] sched/fair: fix boolreturn.cocci warning

On Tue, 2021-12-14 at 09:14 -0500, Steven Rostedt wrote:
> I'll save Peter Zijlstra time from replying to this.
> 
> On Tue, 14 Dec 2021 11:38:45 +0000
> cgel.zte@...il.com wrote:
> 
> > From: Changcheng Deng <deng.changcheng@....com.cn>
> > 
> > ./kernel/sched/fair.c: 9781: 9-10: WARNING: return of 0/1 in function
> > 'imbalanced_active_balance' with return type bool
> > 
> > Return statements in functions returning bool should use true/false
> > instead of 1/0.
> 
> This is a stupid warning. In C "1" is the same as "true" and "0" is the
> same as "false". 
> 
> This is a bogus error message and something not needed to be fixed.
> 
> Please remove these checks from your scripts.
> 
> NACK

Perhaps it is more a change for consistency than a fix for correctness.

$ git grep -P 'return\s+(?:true|false)' kernel/sched/ | wc -l
209


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ