Skip to content

Commit

Permalink
batman-adv: Rename batadv_tvlv_container *_free_ref function to *_put
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sven Eckelmann authored and Antonio Quartulli committed Feb 23, 2016
1 parent ba61004 commit 4a13147
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions net/batman-adv/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,11 +694,11 @@ static void batadv_tvlv_container_release(struct kref *ref)
}

/**
* batadv_tvlv_container_free_ref - decrement the tvlv container refcounter and
* batadv_tvlv_container_put - decrement the tvlv container refcounter and
* possibly release it
* @tvlv: the tvlv container to free
*/
static void batadv_tvlv_container_free_ref(struct batadv_tvlv_container *tvlv)
static void batadv_tvlv_container_put(struct batadv_tvlv_container *tvlv)
{
kref_put(&tvlv->refcount, batadv_tvlv_container_release);
}
Expand Down Expand Up @@ -784,8 +784,8 @@ static void batadv_tvlv_container_remove(struct batadv_priv *bat_priv,
hlist_del(&tvlv->list);

/* first call to decrement the counter, second call to free */
batadv_tvlv_container_free_ref(tvlv);
batadv_tvlv_container_free_ref(tvlv);
batadv_tvlv_container_put(tvlv);
batadv_tvlv_container_put(tvlv);
}

/**
Expand Down

0 comments on commit 4a13147

Please sign in to comment.