Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1357683
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] cgroup: fix boolreturn.cocci warnings |
| Date | 2016-03-15 00:20 +0100 |
| Message-ID | <rcJWh-23u-11@gated-at.bofh.it> (permalink) |
| References | <rcJWh-23u-9@gated-at.bofh.it> <rcJjA-1AB-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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]);
}
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] cgroup: avoid false positive gcc-6 warning Arnd Bergmann <arnd@arndb.de> - 2016-03-14 23:40 +0100 [PATCH] cgroup: fix boolreturn.cocci warnings kbuild test robot <lkp@intel.com> - 2016-03-15 00:20 +0100 Re: [PATCH] cgroup: avoid false positive gcc-6 warning kbuild test robot <lkp@intel.com> - 2016-03-15 00:20 +0100
csiph-web