Commit e0e70234 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by james toy

do_each_thread/while_each_thread wrap a block of code that is in this format:

	for (...)
		do
			...
		while

If curly braces do not surround the inner loop the following warning is
generated by sparse:

	warning: do-while statement is not a compound statement

Fix the warning by adding the braces.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 8a725d44
...@@ -190,10 +190,10 @@ SYSCALL_DEFINE3(setpriority, int, which, int, who, int, niceval) ...@@ -190,10 +190,10 @@ SYSCALL_DEFINE3(setpriority, int, which, int, who, int, niceval)
!(user = find_user(who))) !(user = find_user(who)))
goto out_unlock; /* No processes for this user */ goto out_unlock; /* No processes for this user */
do_each_thread(g, p) do_each_thread(g, p) {
if (__task_cred(p)->uid == who) if (__task_cred(p)->uid == who)
error = set_one_prio(p, niceval, error); error = set_one_prio(p, niceval, error);
while_each_thread(g, p); } while_each_thread(g, p);
if (who != cred->uid) if (who != cred->uid)
free_uid(user); /* For find_user() */ free_uid(user); /* For find_user() */
break; break;
...@@ -253,13 +253,13 @@ SYSCALL_DEFINE2(getpriority, int, which, int, who) ...@@ -253,13 +253,13 @@ SYSCALL_DEFINE2(getpriority, int, which, int, who)
!(user = find_user(who))) !(user = find_user(who)))
goto out_unlock; /* No processes for this user */ goto out_unlock; /* No processes for this user */
do_each_thread(g, p) do_each_thread(g, p) {
if (__task_cred(p)->uid == who) { if (__task_cred(p)->uid == who) {
niceval = 20 - task_nice(p); niceval = 20 - task_nice(p);
if (niceval > retval) if (niceval > retval)
retval = niceval; retval = niceval;
} }
while_each_thread(g, p); } while_each_thread(g, p);
if (who != cred->uid) if (who != cred->uid)
free_uid(user); /* for find_user() */ free_uid(user); /* for find_user() */
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment