Subject: Re: linux-next: rr tree build warning

From: Rusty Russell <[email-masked]>
Date: Fri, 24 Oct 2008 14:44:09 +1100

On Friday 24 October 2008 13:34:07 Stephen Rothwell wrote:
> Hi Rusty,
>
> Today's linux-next build (powerpc ppc64_defconfig) got this warning:
>
> kernel/workqueue.c: In function 'work_on_cpu':
> kernel/workqueue.c:1009: warning: passing argument 1 of 'flush_workqueue'
> from incompatible pointer type
>
> You are passing a "struct work_struct *" to fluxh_workqueue which wants a
> "struct workqueue_struct *".

Please s/flush_workqueue/flush_work/.  Somehow I missed that warning (and
didn't re-test after that trivial change).

Tested, even.

diff -r 4d829bda1768 kernel/workqueue.c
--- a/kernel/workqueue.c	Fri Oct 24 14:10:09 2008 +1100
+++ b/kernel/workqueue.c	Fri Oct 24 14:10:58 2008 +1100
@@ -1006,7 +1006,7 @@ long work_on_cpu(unsigned int cpu, long 
 		wfc.ret = -EINVAL;
 	else {
 		schedule_work_on(cpu, &wfc.work);
-		flush_workqueue(&wfc.work);
+		flush_work(&wfc.work);
 	}
 	put_online_cpus();
 
Sorry,
Rusty.