aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorMika Kukkonen <mikukkon@gmail.com>2005-09-06 18:17:17 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-07 19:57:28 -0400
commit230649da7cb73914b8b2a1ffc802a2951e970454 (patch)
treeea18d1246118221640d1aebc89d6f1ba11b4869c /kernel/workqueue.c
parentb80068543794864f533163c586be2a1a9880a65d (diff)
[PATCH] create_workqueue_thread() signedness fix
With "-W -Wno-unused -Wno-sign-compare" I get the following compile warning: CC kernel/workqueue.o kernel/workqueue.c: In function `workqueue_cpu_callback': kernel/workqueue.c:504: warning: ordered comparison of pointer with integer zero On error create_workqueue_thread() returns NULL, not negative pointer, so following trivial patch suggests itself. Signed-off-by: Mika Kukkonen <mikukkon@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index c7e36d4a70ca..a3de837a8ddd 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -499,7 +499,7 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb,
499 case CPU_UP_PREPARE: 499 case CPU_UP_PREPARE:
500 /* Create a new workqueue thread for it. */ 500 /* Create a new workqueue thread for it. */
501 list_for_each_entry(wq, &workqueues, list) { 501 list_for_each_entry(wq, &workqueues, list) {
502 if (create_workqueue_thread(wq, hotcpu) < 0) { 502 if (!create_workqueue_thread(wq, hotcpu)) {
503 printk("workqueue for %i failed\n", hotcpu); 503 printk("workqueue for %i failed\n", hotcpu);
504 return NOTIFY_BAD; 504 return NOTIFY_BAD;
505 } 505 }