[2/2] batman-adv: Silence checkpatch warnings about spinlocks

Message ID 1295500975-3884-2-git-send-email-sven@narfation.org (mailing list archive)
State Accepted, archived
Headers

Commit Message

Sven Eckelmann Jan. 20, 2011, 5:22 a.m. UTC
  Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 batman-adv/hash.h       |    4 ++--
 batman-adv/originator.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
  

Comments

Marek Lindner Jan. 21, 2011, 3:09 p.m. UTC | #1
On Thursday 20 January 2011 06:22:55 Sven Eckelmann wrote:
> @@ -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
  

Patch

diff --git a/batman-adv/hash.h b/batman-adv/hash.h
index d47735c..a975e07 100644
--- a/batman-adv/hash.h
+++ b/batman-adv/hash.h
@@ -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;
diff --git a/batman-adv/originator.c b/batman-adv/originator.c
index 5a6745f..cf2ec37 100644
--- a/batman-adv/originator.c
+++ b/batman-adv/originator.c
@@ -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;