aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2009-12-14 21:00:22 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-15 11:53:26 -0500
commitdfc6a736d452a8c308190b618b065c2257d370ff (patch)
tree129800fa31f88a5f6d520a2c0d0a64273488a3fa /kernel
parent948c1e2521979c332b21b623414cf258150f214e (diff)
kernel/sys.c: fix "warning: do-while statement is not a compound statement" noise
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: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sys.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/sys.c b/kernel/sys.c
index 585d6cd10040..20ccfb5da6af 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -189,10 +189,10 @@ SYSCALL_DEFINE3(setpriority, int, which, int, who, int, niceval)
189 !(user = find_user(who))) 189 !(user = find_user(who)))
190 goto out_unlock; /* No processes for this user */ 190 goto out_unlock; /* No processes for this user */
191 191
192 do_each_thread(g, p) 192 do_each_thread(g, p) {
193 if (__task_cred(p)->uid == who) 193 if (__task_cred(p)->uid == who)
194 error = set_one_prio(p, niceval, error); 194 error = set_one_prio(p, niceval, error);
195 while_each_thread(g, p); 195 } while_each_thread(g, p);
196 if (who != cred->uid) 196 if (who != cred->uid)
197 free_uid(user); /* For find_user() */ 197 free_uid(user); /* For find_user() */
198 break; 198 break;
@@ -252,13 +252,13 @@ SYSCALL_DEFINE2(getpriority, int, which, int, who)
252 !(user = find_user(who))) 252 !(user = find_user(who)))
253 goto out_unlock; /* No processes for this user */ 253 goto out_unlock; /* No processes for this user */
254 254
255 do_each_thread(g, p) 255 do_each_thread(g, p) {
256 if (__task_cred(p)->uid == who) { 256 if (__task_cred(p)->uid == who) {
257 niceval = 20 - task_nice(p); 257 niceval = 20 - task_nice(p);
258 if (niceval > retval) 258 if (niceval > retval)
259 retval = niceval; 259 retval = niceval;
260 } 260 }
261 while_each_thread(g, p); 261 } while_each_thread(g, p);
262 if (who != cred->uid) 262 if (who != cred->uid)
263 free_uid(user); /* for find_user() */ 263 free_uid(user); /* for find_user() */
264 break; 264 break;