From: kbuild test robot <lkp@intel.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: kbuild-all@01.org, Tejun Heo <tj@kernel.org>,
Li Zefan <lizefan@huawei.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Arnd Bergmann <arnd@arndb.de>,
Aditya Kali <adityakali@google.com>,
Aleksa Sarai <cyphar@cyphar.com>,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] cgroup: fix boolreturn.cocci warnings
Date: Tue, 15 Mar 2016 07:13:31 +0800 [thread overview]
Message-ID: <20160314231331.GA78584@athens> (raw)
In-Reply-To: <1457994978-1057495-1-git-send-email-arnd@arndb.de>
kernel/cgroup.c:262:9-10: WARNING: return of 0/1 in function 'cgroup_ssid_enabled' with return type bool
Return statements in functions returning bool should use
true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci
CC: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -259,7 +259,7 @@ static int cgroup_addrm_files(struct cgr
static bool cgroup_ssid_enabled(int ssid)
{
if (CGROUP_SUBSYS_COUNT == 0)
- return 0;
+ return false;
return static_key_enabled(cgroup_subsys_enabled_key[ssid]);
}
next prev parent reply other threads:[~2016-03-14 23:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-14 22:36 [PATCH] cgroup: avoid false positive gcc-6 warning Arnd Bergmann
2016-03-14 23:13 ` kbuild test robot [this message]
2016-03-14 23:13 ` kbuild test robot
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=20160314231331.GA78584@athens \
--to=lkp@intel.com \
--cc=adityakali@google.com \
--cc=arnd@arndb.de \
--cc=cgroups@vger.kernel.org \
--cc=cyphar@cyphar.com \
--cc=hannes@cmpxchg.org \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=tj@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).