hlist: drop the node parameter from iterators
[linux-2.6-block.git] / drivers / net / tun.c
index b6f45c5d84d52575e70679556b78b663534cfe08..2c6a22e278ea15843b7fb4500749304aad0a1444 100644 (file)
@@ -197,9 +197,8 @@ static inline u32 tun_hashfn(u32 rxhash)
 static struct tun_flow_entry *tun_flow_find(struct hlist_head *head, u32 rxhash)
 {
        struct tun_flow_entry *e;
-       struct hlist_node *n;
 
-       hlist_for_each_entry_rcu(e, n, head, hash_link) {
+       hlist_for_each_entry_rcu(e, head, hash_link) {
                if (e->rxhash == rxhash)
                        return e;
        }
@@ -241,9 +240,9 @@ static void tun_flow_flush(struct tun_struct *tun)
        spin_lock_bh(&tun->lock);
        for (i = 0; i < TUN_NUM_FLOW_ENTRIES; i++) {
                struct tun_flow_entry *e;
-               struct hlist_node *h, *n;
+               struct hlist_node *n;
 
-               hlist_for_each_entry_safe(e, h, n, &tun->flows[i], hash_link)
+               hlist_for_each_entry_safe(e, n, &tun->flows[i], hash_link)
                        tun_flow_delete(tun, e);
        }
        spin_unlock_bh(&tun->lock);
@@ -256,9 +255,9 @@ static void tun_flow_delete_by_queue(struct tun_struct *tun, u16 queue_index)
        spin_lock_bh(&tun->lock);
        for (i = 0; i < TUN_NUM_FLOW_ENTRIES; i++) {
                struct tun_flow_entry *e;
-               struct hlist_node *h, *n;
+               struct hlist_node *n;
 
-               hlist_for_each_entry_safe(e, h, n, &tun->flows[i], hash_link) {
+               hlist_for_each_entry_safe(e, n, &tun->flows[i], hash_link) {
                        if (e->queue_index == queue_index)
                                tun_flow_delete(tun, e);
                }
@@ -279,9 +278,9 @@ static void tun_flow_cleanup(unsigned long data)
        spin_lock_bh(&tun->lock);
        for (i = 0; i < TUN_NUM_FLOW_ENTRIES; i++) {
                struct tun_flow_entry *e;
-               struct hlist_node *h, *n;
+               struct hlist_node *n;
 
-               hlist_for_each_entry_safe(e, h, n, &tun->flows[i], hash_link) {
+               hlist_for_each_entry_safe(e, n, &tun->flows[i], hash_link) {
                        unsigned long this_timer;
                        count++;
                        this_timer = e->updated + delay;