batman-adv: Rename batadv_dat_entry *_free_ref function to *_put
authorSven Eckelmann <sven@narfation.org>
Sun, 17 Jan 2016 10:01:17 +0000 (11:01 +0100)
committerAntonio Quartulli <a@unstable.cc>
Tue, 23 Feb 2016 05:48:28 +0000 (13:48 +0800)
The batman-adv source code is the only place in the kernel which uses the
*_free_ref naming scheme for the *_put functions. Changing it to *_put
makes it more consistent and makes it easier to understand the connection
to the *_get functions.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
net/batman-adv/distributed-arp-table.c

index 919f344..4c9b69d 100644 (file)
@@ -77,11 +77,11 @@ static void batadv_dat_entry_release(struct kref *ref)
 }
 
 /**
- * batadv_dat_entry_free_ref - decrement the dat_entry refcounter and possibly
+ * batadv_dat_entry_put - decrement the dat_entry refcounter and possibly
  *  release it
  * @dat_entry: dat_entry to be free'd
  */
-static void batadv_dat_entry_free_ref(struct batadv_dat_entry *dat_entry)
+static void batadv_dat_entry_put(struct batadv_dat_entry *dat_entry)
 {
        kref_put(&dat_entry->refcount, batadv_dat_entry_release);
 }
@@ -135,7 +135,7 @@ static void __batadv_dat_purge(struct batadv_priv *bat_priv,
                                continue;
 
                        hlist_del_rcu(&dat_entry->hash_entry);
-                       batadv_dat_entry_free_ref(dat_entry);
+                       batadv_dat_entry_put(dat_entry);
                }
                spin_unlock_bh(list_lock);
        }
@@ -349,7 +349,7 @@ static void batadv_dat_entry_add(struct batadv_priv *bat_priv, __be32 ip,
 
        if (unlikely(hash_added != 0)) {
                /* remove the reference for the hash */
-               batadv_dat_entry_free_ref(dat_entry);
+               batadv_dat_entry_put(dat_entry);
                goto out;
        }
 
@@ -358,7 +358,7 @@ static void batadv_dat_entry_add(struct batadv_priv *bat_priv, __be32 ip,
 
 out:
        if (dat_entry)
-               batadv_dat_entry_free_ref(dat_entry);
+               batadv_dat_entry_put(dat_entry);
 }
 
 #ifdef CONFIG_BATMAN_ADV_DEBUG
@@ -1029,7 +1029,7 @@ bool batadv_dat_snoop_outgoing_arp_request(struct batadv_priv *bat_priv,
        }
 out:
        if (dat_entry)
-               batadv_dat_entry_free_ref(dat_entry);
+               batadv_dat_entry_put(dat_entry);
        return ret;
 }
 
@@ -1109,7 +1109,7 @@ bool batadv_dat_snoop_incoming_arp_request(struct batadv_priv *bat_priv,
        }
 out:
        if (dat_entry)
-               batadv_dat_entry_free_ref(dat_entry);
+               batadv_dat_entry_put(dat_entry);
        if (ret)
                kfree_skb(skb);
        return ret;
@@ -1262,6 +1262,6 @@ bool batadv_dat_drop_broadcast_packet(struct batadv_priv *bat_priv,
 
 out:
        if (dat_entry)
-               batadv_dat_entry_free_ref(dat_entry);
+               batadv_dat_entry_put(dat_entry);
        return ret;
 }