From: Joe Perches <joe@perches.com>
To: Steven Rostedt <rostedt@goodmis.org>, cgel.zte@gmail.com
Cc: mingo@redhat.com, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
bsegall@google.com, mgorman@suse.de, bristot@redhat.com,
linux-kernel@vger.kernel.org,
Changcheng Deng <deng.changcheng@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH] sched/fair: fix boolreturn.cocci warning
Date: Tue, 14 Dec 2021 07:24:34 -0800 [thread overview]
Message-ID: <b1cb1fd9be34d2fcec2578e06facc4168de4f554.camel@perches.com> (raw)
In-Reply-To: <20211214091446.383ec08e@gandalf.local.home>
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@gmail.com wrote:
>
> > From: Changcheng Deng <deng.changcheng@zte.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
next prev parent reply other threads:[~2021-12-14 15:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-14 11:38 cgel.zte
2021-12-14 14:14 ` Steven Rostedt
2021-12-14 15:24 ` Joe Perches [this message]
2021-12-14 15:52 ` Steven Rostedt
2021-12-14 20:00 ` Joe Perches
2022-01-14 0:12 davidcomponentone
2022-03-17 1:47 Jiapeng Chong
2022-07-05 7:38 Jiapeng Chong
2022-07-05 14:31 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b1cb1fd9be34d2fcec2578e06facc4168de4f554.camel@perches.com \
--to=joe@perches.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=cgel.zte@gmail.com \
--cc=deng.changcheng@zte.com.cn \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=zealci@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®