Skip to contentSkip to conversation

ipt_IDLETIMER: worqueue fixes

PATCH In review Arnaud Patard (Rtp) 2 participants 2 messages Jan 8, 2007 – Jan 9, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipt_IDLETIMER: worqueue fixes

This patch fixes the build of ipt_ILDETIMER with current omap -git

---

---
net/ipv4/netfilter/ipt_IDLETIMER.c | 7 4 + 3 - 0 !

 1 file changed, 4 insertions(+), 3 deletions(-)
net/ipv4/netfilter/ipt_IDLETIMER.c +4 -3
Index: linux-omap-2.6/net/ipv4/netfilter/ipt_IDLETIMER.c
===================================================================
@@ -33,6 +33,7 @@
 #include <linux/netfilter_ipv4/ip_tables.h>
 #include <linux/netfilter_ipv4/ipt_IDLETIMER.h>
 #include <linux/kobject.h>
+#include <linux/workqueue.h>
 
 #if 0
 #define DEBUGP(format, args...) printk("%s:%s:" format, \
@@ -68,9 +69,9 @@ static void utimer_delete(struct utimer_
 	kfree(timer);
 }
 
-static void utimer_work(void * data)
+static void utimer_work(struct work_struct *work)
 {
-	struct utimer_t *timer = (struct utimer_t *) data;
+	struct utimer_t *timer = container_of(work, struct utimer_t, work);
 	struct net_device *netdev;
 
 	netdev = dev_get_by_name(timer->name);
@@ -110,7 +111,7 @@ static struct utimer_t *utimer_create(co
 	timer->timer.function = utimer_expired;
 	timer->timer.data = (unsigned long) timer;
 
-	INIT_WORK(&timer->work, utimer_work, timer);
+	INIT_WORK(&timer->work, utimer_work);
 
 	DEBUGP("Created timer '%s'\n", timer->name);
 
#1 lore raw
Quoted 34 lines · Arnaud Patard

This patch fixes the build of ipt_ILDETIMER with current omap -git

---

---
net/ipv4/netfilter/ipt_IDLETIMER.c | 7 4 + 3 - 0 !

 1 file changed, 4 insertions(+), 3 deletions(-)

Index: linux-omap-2.6/net/ipv4/netfilter/ipt_IDLETIMER.c
===================================================================

net/ipv4/netfilter/ipt_IDLETIMER.c +3 -2
@@ -33,6 +33,7 @@
 #include <linux/netfilter_ipv4/ip_tables.h>
 #include <linux/netfilter_ipv4/ipt_IDLETIMER.h>
 #include <linux/kobject.h>
+#include <linux/workqueue.h>
 
 #if 0
 #define DEBUGP(format, args...) printk("%s:%s:" format, \
@@ -68,9 +69,9 @@ static void utimer_delete(struct utimer_
 	kfree(timer);
 }
 
-static void utimer_work(void * data)
+static void utimer_work(struct work_struct *work)
 {
-	struct utimer_t *timer = (struct utimer_t *) data;
+	struct utimer_t *timer = container_of(work, struct utimer_t, work);
 	struct net_device *netdev;
 
 	netdev = dev_get_by_name(timer->name);

net/ipv4/netfilter/ipt_IDLETIMER.c static struct utimer_t *utimer_create(co · line 117

Quoted 8 lines
net/ipv4/netfilter/ipt_IDLETIMER.c +1 -1
@@ -110,7 +111,7 @@ static struct utimer_t *utimer_create(co
 	timer->timer.function = utimer_expired;
 	timer->timer.data = (unsigned long) timer;
 
-	INIT_WORK(&timer->work, utimer_work, timer);
+	INIT_WORK(&timer->work, utimer_work);
 
 	DEBUGP("Created timer '%s'\n", timer->name);
 

Pushing today.

Tony