Skip to content

Commit

Permalink
cgroup: remove unnecessary unlikely()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yangtao Li authored and Tejun Heo committed Nov 5, 2018
1 parent 6510223 commit 4d9ebbe
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kernel/cgroup/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4d9ebbe

Please sign in to comment.