Skip to contentSkip to conversation

fix ipt_IDLETIMER.c compilation

PATCH In review Paul Walmsley 2 participants 2 messages May 8, 2007 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 fix ipt_IDLETIMER.c compilation

Update net/ipv4/netfilter/ipt_IDLETIMER.c to compile after recent changes to include/linux/netdevice.h (commit 4e9cac2ba437fcb093c7417b1cd91a77ebd1756a). Compile-tested only.

CC net/ipv4/netfilter/ipt_IDLETIMER.o
net/ipv4/netfilter/ipt_IDLETIMER.c: In function 'utimer_notifier_call':
net/ipv4/netfilter/ipt_IDLETIMER.c:189: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result net/ipv4/netfilter/ipt_IDLETIMER.c: In function 'utimer_fini':
net/ipv4/netfilter/ipt_IDLETIMER.c:222: error: 'dev_base' undeclared (first use in this function) net/ipv4/netfilter/ipt_IDLETIMER.c:222: error: (Each undeclared identifier is reported only once net/ipv4/netfilter/ipt_IDLETIMER.c:222: error: for each function it appears in.) net/ipv4/netfilter/ipt_IDLETIMER.c:222: error: 'struct net_device' has no member named 'next'
make[3]: *** [net/ipv4/netfilter/ipt_IDLETIMER.o] Error 1

---
 net/ipv4/netfilter/ipt_IDLETIMER.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/netfilter/ipt_IDLETIMER.c +1 -1
Index: linux-omap-2.6/net/ipv4/netfilter/ipt_IDLETIMER.c
===================================================================
@@ -219,7 +219,7 @@ static void utimer_fini(void)
 
 	rtnl_lock();
 	unregister_netdevice_notifier(&utimer_notifier_block);
-	for (dev = dev_base; dev; dev = dev->next)
+	for_each_netdev(dev)
 		utimer_notifier_call(&utimer_notifier_block,
 				     NETDEV_DOWN, dev);
 	rtnl_unlock();
#2 lore raw
Quoted 36 lines · Paul Walmsley

Update net/ipv4/netfilter/ipt_IDLETIMER.c to compile after recent changes to include/linux/netdevice.h (commit 4e9cac2ba437fcb093c7417b1cd91a77ebd1756a). Compile-tested only.

CC net/ipv4/netfilter/ipt_IDLETIMER.o
net/ipv4/netfilter/ipt_IDLETIMER.c: In function 'utimer_notifier_call':
net/ipv4/netfilter/ipt_IDLETIMER.c:189: warning: ignoring return value of 'device_create_file', declared with attribute warn_unused_result net/ipv4/netfilter/ipt_IDLETIMER.c: In function 'utimer_fini':
net/ipv4/netfilter/ipt_IDLETIMER.c:222: error: 'dev_base' undeclared (first use in this function) net/ipv4/netfilter/ipt_IDLETIMER.c:222: error: (Each undeclared identifier is reported only once net/ipv4/netfilter/ipt_IDLETIMER.c:222: error: for each function it appears in.) net/ipv4/netfilter/ipt_IDLETIMER.c:222: error: 'struct net_device' has no member named 'next'
make[3]: *** [net/ipv4/netfilter/ipt_IDLETIMER.o] Error 1

---
 net/ipv4/netfilter/ipt_IDLETIMER.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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

net/ipv4/netfilter/ipt_IDLETIMER.c +1 -1
@@ -219,7 +219,7 @@ static void utimer_fini(void)
 
 	rtnl_lock();
 	unregister_netdevice_notifier(&utimer_notifier_block);
-	for (dev = dev_base; dev; dev = dev->next)
+	for_each_netdev(dev)
 		utimer_notifier_call(&utimer_notifier_block,
 				     NETDEV_DOWN, dev);
 	rtnl_unlock();
Signature · 1 line
-- 

Pushing this one too.

Tony