[ewg] [PATCH 5/8 warnings] DECLARE_DELAYED_WORK()

Jeremy Brown jeremy.brown at qlogic.com
Fri Oct 5 16:47:44 PDT 2007


Tziporet, Vlad,

I've included the fifth of the eight warning fix patches.

Thanks!

Jeremy Brown

---

fix compiler warnings from backported DECLARE_DELAYED_WORK() wrappers

Signed-off-by: John Gregor <john.gregor at qlogic.com>

diff -r 074354d2ab58 kernel_addons/backport/2.6.11/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.11/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.11/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -53,7 +53,7 @@ int backport_schedule_delayed_work(struc
 #define DECLARE_WORK(n, f) \
 	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.11_FC4/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.11_FC4/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.11_FC4/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -44,9 +44,9 @@ int backport_schedule_delayed_work(struc
 
 #undef DECLARE_WORK
 #define DECLARE_WORK(n, f) \
-	struct work_struct n = __WORK_INITIALIZER(n, f, &(n))
+	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.12/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.12/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.12/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -52,7 +52,7 @@ int backport_schedule_delayed_work(struc
 #define DECLARE_WORK(n, f) \
 	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.13/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.13/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.13/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -52,7 +52,7 @@ int backport_schedule_delayed_work(struc
 #define DECLARE_WORK(n, f) \
 	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.13_suse10_0_u/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -44,9 +44,9 @@ int backport_schedule_delayed_work(struc
 
 #undef DECLARE_WORK
 #define DECLARE_WORK(n, f) \
-	struct work_struct n = __WORK_INITIALIZER(n, f, &(n))
+	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.14/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.14/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.14/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -52,7 +52,7 @@ int backport_schedule_delayed_work(struc
 #define DECLARE_WORK(n, f) \
 	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.15/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.15/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.15/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -52,7 +52,7 @@ int backport_schedule_delayed_work(struc
 #define DECLARE_WORK(n, f) \
 	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.15_ubuntu606/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.15_ubuntu606/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.15_ubuntu606/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -52,7 +52,7 @@ int backport_schedule_delayed_work(struc
 #define DECLARE_WORK(n, f) \
 	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.16/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.16/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.16/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -52,7 +52,7 @@ int backport_schedule_delayed_work(struc
 #define DECLARE_WORK(n, f) \
 	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.16_sles10/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.16_sles10/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.16_sles10/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -52,7 +52,7 @@ int backport_schedule_delayed_work(struc
 #define DECLARE_WORK(n, f) \
 	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.16_sles10_sp1/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.16_sles10_sp1/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.16_sles10_sp1/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -52,7 +52,7 @@ int backport_schedule_delayed_work(struc
 #define DECLARE_WORK(n, f) \
 	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.17/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.17/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.17/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -52,7 +52,7 @@ int backport_schedule_delayed_work(struc
 #define DECLARE_WORK(n, f) \
 	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.18/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.18/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.18/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -52,7 +52,7 @@ int backport_schedule_delayed_work(struc
 #define DECLARE_WORK(n, f) \
 	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.18_FC6/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.18_FC6/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.18_FC6/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -52,7 +52,7 @@ int backport_schedule_delayed_work(struc
 #define DECLARE_WORK(n, f) \
 	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.19/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.19/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.19/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -52,7 +52,7 @@ int backport_schedule_delayed_work(struc
 #define DECLARE_WORK(n, f) \
 	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.5_sles9_sp3/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -53,7 +53,7 @@ int backport_schedule_delayed_work(struc
 #define DECLARE_WORK(n, f) \
 	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.9_U2/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.9_U2/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.9_U2/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -53,7 +53,7 @@ int backport_schedule_delayed_work(struc
 #define DECLARE_WORK(n, f) \
 	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.9_U3/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.9_U3/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.9_U3/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -53,7 +53,7 @@ int backport_schedule_delayed_work(struc
 #define DECLARE_WORK(n, f) \
 	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.9_U4/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.9_U4/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.9_U4/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -53,7 +53,7 @@ int backport_schedule_delayed_work(struc
 #define DECLARE_WORK(n, f) \
 	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work
diff -r 074354d2ab58 kernel_addons/backport/2.6.9_U5/include/linux/workqueue.h
--- a/kernel_addons/backport/2.6.9_U5/include/linux/workqueue.h	Mon Jul 02 14:50:17 2007 -0700
+++ b/kernel_addons/backport/2.6.9_U5/include/linux/workqueue.h	Mon Jul 02 14:55:47 2007 -0700
@@ -53,7 +53,7 @@ int backport_schedule_delayed_work(struc
 #define DECLARE_WORK(n, f) \
 	struct work_struct n = __WORK_INITIALIZER(n, (void (*)(void *))f, &(n))
 #define DECLARE_DELAYED_WORK(n, f) \
-	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, f, &(n.work)) }
+	struct delayed_work n = { .work = __WORK_INITIALIZER(n.work, (void (*)(void *))f, &(n.work)) }
 
 #define queue_delayed_work backport_queue_delayed_work
 #define cancel_delayed_work backport_cancel_delayed_work





More information about the ewg mailing list