[ATALK]: In notifier handlers convert the void pointer to a netdevice
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 12 Sep 2007 09:26:59 +0000 (11:26 +0200)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:49:02 +0000 (16:49 -0700)
This slightly improves code safety and clarity.

Later network namespace patches touch this code so this is a
preliminary cleanup.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/appletalk/aarp.c
net/appletalk/ddp.c

index 3d1655f..80b5414 100644 (file)
@@ -330,15 +330,16 @@ static void aarp_expire_timeout(unsigned long unused)
 static int aarp_device_event(struct notifier_block *this, unsigned long event,
                             void *ptr)
 {
+       struct net_device *dev = ptr;
        int ct;
 
        if (event == NETDEV_DOWN) {
                write_lock_bh(&aarp_lock);
 
                for (ct = 0; ct < AARP_HASH_SIZE; ct++) {
-                       __aarp_expire_device(&resolved[ct], ptr);
-                       __aarp_expire_device(&unresolved[ct], ptr);
-                       __aarp_expire_device(&proxies[ct], ptr);
+                       __aarp_expire_device(&resolved[ct], dev);
+                       __aarp_expire_device(&unresolved[ct], dev);
+                       __aarp_expire_device(&proxies[ct], dev);
                }
 
                write_unlock_bh(&aarp_lock);
index fbdfb12..594b597 100644 (file)
@@ -647,9 +647,11 @@ static inline void atalk_dev_down(struct net_device *dev)
 static int ddp_device_event(struct notifier_block *this, unsigned long event,
                            void *ptr)
 {
+       struct net_device *dev = ptr;
+
        if (event == NETDEV_DOWN)
                /* Discard any use of this */
-               atalk_dev_down(ptr);
+               atalk_dev_down(dev);
 
        return NOTIFY_DONE;
 }