UPSTREAM: 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> Change-Id: I092c0aae2a06b13d3fc9ecfbb24ab3e8d10235f6 (cherry picked from commit 4d9ebbe2b061a9c25e12ba8539ba172533132eb6) Bug: 154548692 Signed-off-by: Marco Ballesio <balejs@google.com>
This commit is contained in:
parent
0e00bb1cf7
commit
0d53c30064
1 changed files with 1 additions and 3 deletions
|
@ -6147,11 +6147,9 @@ 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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue