From: Yangtao Li Date: Sun, 4 Nov 2018 02:27:41 +0000 (-0400) Subject: cgroup: remove unnecessary unlikely() X-Git-Tag: rel_imx_5.10.35_2.0.0-somdevices.0~5624^2~18 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=4d9ebbe2b061a9c25e12ba8539ba172533132eb6;p=linux.git cgroup: remove unnecessary unlikely() WARN_ON() already contains an unlikely(), so it's not necessary to use unlikely. Signed-off-by: Yangtao Li Signed-off-by: Tejun Heo --- 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;