diff options
author | 2018-11-03 22:27:41 -0400 | |
---|---|---|
committer | 2018-11-05 08:28:11 -0800 | |
commit | 4d9ebbe2b061a9c25e12ba8539ba172533132eb6 (patch) | |
tree | 1b87c14f10e19591949bd4c074668e5a2cdabd86 /kernel/cgroup/cgroup.c | |
parent | Linux 4.20-rc1 (diff) | |
download | linux-4d9ebbe2b061a9c25e12ba8539ba172533132eb6.tar.gz linux-4d9ebbe2b061a9c25e12ba8539ba172533132eb6.tar.bz2 linux-4d9ebbe2b061a9c25e12ba8539ba172533132eb6.zip |
cgroup: remove unnecessary unlikely()
WARN_ON() already contains an unlikely(), so it's not necessary to use
unlikely.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup/cgroup.c')
-rw-r--r-- | kernel/cgroup/cgroup.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c index 6aaf5dd5383b..2e5d90dfcb49 100644 --- a/kernel/cgroup/cgroup.c +++ b/kernel/cgroup/cgroup.c @@ -5978,10 +5978,8 @@ static ssize_t show_delegatable_files(struct cftype *files, char *buf, ret += snprintf(buf + ret, size - ret, "%s\n", cft->name); - if (unlikely(ret >= size)) { - WARN_ON(1); + if (WARN_ON(ret >= size)) break; - } } return ret; |