Skip to contentSkip to conversation

batman-adv: Mark bucket_free_orig_rcu as static

PATCH Applied Sven Eckelmann 2 participants 4 messages Jan 20, 2011 – Jan 21, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 batman-adv: Mark bucket_free_orig_rcu as static

---
 batman-adv/originator.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
batman-adv/originator.c +1 -1
index 35ab3ab..5a6745f 100644
@@ -179,7 +179,7 @@ void originator_free(struct bat_priv *bat_priv)
 	hash_destroy(hash);
 }
 
-void bucket_free_orig_rcu(struct rcu_head *rcu)
+static void bucket_free_orig_rcu(struct rcu_head *rcu)
 {
 	struct element_t *bucket;
 	struct orig_node *orig_node;
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH 2/2 batman-adv: Silence checkpatch warnings about spinlocks

---
 batman-adv/hash.h       |    4 ++--
 batman-adv/originator.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
batman-adv/hash.h +2 -2
index d47735c..a975e07 100644
@@ -70,7 +70,7 @@ static inline void hash_delete(struct hashtable_t *hash,
 	struct hlist_head *head;
 	struct hlist_node *walk, *safe;
 	struct element_t *bucket;
-	spinlock_t *list_lock;
+	spinlock_t *list_lock; /* spinlock to protect write access */
 	int i;
 
 	for (i = 0; i < hash->size; i++) {
@@ -100,7 +100,7 @@ static inline int hash_add(struct hashtable_t *hash,
 	struct hlist_head *head;
 	struct hlist_node *walk, *safe;
 	struct element_t *bucket;
-	spinlock_t *list_lock;
+	spinlock_t *list_lock; /* spinlock to protect write access */
 
 	if (!hash)
 		goto err;
batman-adv/originator.c +2 -2
index 5a6745f..cf2ec37 100644
@@ -150,7 +150,7 @@ void originator_free(struct bat_priv *bat_priv)
 	struct hlist_node *walk, *safe;
 	struct hlist_head *head;
 	struct element_t *bucket;
-	spinlock_t *list_lock;
+	spinlock_t *list_lock; /* spinlock to protect write access */
 	struct orig_node *orig_node;
 	int i;
 
@@ -353,7 +353,7 @@ static void _purge_orig(struct bat_priv *bat_priv)
 	struct hlist_node *walk, *safe;
 	struct hlist_head *head;
 	struct element_t *bucket;
-	spinlock_t *list_lock;
+	spinlock_t *list_lock; /* spinlock to protect write access */
 	struct orig_node *orig_node;
 	int i;
 
Signature · 1 line
1.7.2.3
#3 lore raw
In reply to Sven Eckelmann

batman-adv/originator.c void originator_free(struct bat_priv *bat_priv) · line 185

Quoted 5 lines · On Thursday 20 January 2011 06:22:54 Sven Eckelmann wrote:
batman-adv/originator.c +1 -1
-void bucket_free_orig_rcu(struct rcu_head *rcu)
+static void bucket_free_orig_rcu(struct rcu_head *rcu)
 {
 	struct element_t *bucket;
 	struct orig_node *orig_node;

Applied in revision 1910.

Thanks,
Marek

#2 lore raw

Re: [B.A.T.M.A.N.] [PATCH 2/2] batman-adv: Silence checkpatch warnings about spinlocks

In reply to Sven Eckelmann

batman-adv/originator.c static void _purge_orig(struct bat_priv *bat_priv) · line 358

Quoted 8 lines · On Thursday 20 January 2011 06:22:55 Sven Eckelmann wrote:
batman-adv/originator.c +1 -1
@@ -353,7 +353,7 @@ static void _purge_orig(struct bat_priv *bat_priv)
        struct hlist_node *walk, *safe;
        struct hlist_head *head;
        struct element_t *bucket;
-       spinlock_t *list_lock;
+       spinlock_t *list_lock; /* spinlock to protect write access */
        struct orig_node *orig_node;
        int i;

Applied in version 1911.

Thanks,
Marek