From: Mika Kukkonen Date: Tue, 6 Sep 2005 22:17:17 +0000 (-0700) Subject: [PATCH] create_workqueue_thread() signedness fix X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=230649da7cb73914b8b2a1ffc802a2951e970454;p=openwrt%2Fstaging%2Fblogic.git [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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, case CPU_UP_PREPARE: /* Create a new workqueue thread for it. */ list_for_each_entry(wq, &workqueues, list) { - if (create_workqueue_thread(wq, hotcpu) < 0) { + if (!create_workqueue_thread(wq, hotcpu)) { printk("workqueue for %i failed\n", hotcpu); return NOTIFY_BAD; }