aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/types.h
diff options
context:
space:
mode:
authorAntonio Quartulli <ordex@autistici.org>2012-04-14 13:15:26 +0200
committerAntonio Quartulli <ordex@autistici.org>2012-06-18 18:00:58 +0200
commit66a1b2bcb34b0c74a3422968b15a7ea853ea5a2d (patch)
tree4753388e3a5e44b45481d27485a09c8e79ddcd1b /net/batman-adv/types.h
parentbatman-adv: Initialize lockdep class keys for hashes (diff)
downloadlinux-dev-66a1b2bcb34b0c74a3422968b15a7ea853ea5a2d.tar.xz
linux-dev-66a1b2bcb34b0c74a3422968b15a7ea853ea5a2d.zip
batman-adv: convert bat_priv->tt_crc from atomic_t to uint16_t
In the code we neever need to atomically check and set the bat_priv->tt_crc field value. It is simply set and read once in different pieces of the code. Therefore this field can be safely be converted from atomic_t to uint16_t. Reported-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to '')
-rw-r--r--net/batman-adv/types.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index 61308e8016ff..547dc339f33d 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -210,7 +210,7 @@ struct bat_priv {
spinlock_t vis_list_lock; /* protects vis_info::recv_list */
atomic_t num_local_tt;
/* Checksum of the local table, recomputed before sending a new OGM */
- atomic_t tt_crc;
+ uint16_t tt_crc;
unsigned char *tt_buff;
int16_t tt_buff_len;
spinlock_t tt_buff_lock; /* protects tt_buff */