cgroup: remove unnecessary unlikely()
PATCH 1/1 cgroup: remove unnecessary unlikely()
WARN_ON() already contains an unlikely(), so it's not necessary to use unlikely.
Signed-off-by Yangtao Li <[email protected]>
--- kernel/cgroup/cgroup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
kernel/cgroup/cgroup.c +1 -3
@@ -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;
Signature · 1 line
2.17.0
Quoted 4 lines · Yangtao Li
WARN_ON()already contains anunlikely(), so it's not necessary to use unlikely.Signed-off-by Yangtao Li <[email protected]>
Applied to cgroup/for-4.21.
Thanks.
Signature · 1 line
tejun