diff options
author | Antonio Quartulli <ordex@autistici.org> | 2012-04-14 07:15:26 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-18 12:00:58 -0400 |
commit | 66a1b2bcb34b0c74a3422968b15a7ea853ea5a2d (patch) | |
tree | 4753388e3a5e44b45481d27485a09c8e79ddcd1b /net/batman-adv/bat_iv_ogm.c | |
parent | 5d52dad27a08d2c8851acb12b041088ec07881dd (diff) |
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 'net/batman-adv/bat_iv_ogm.c')
-rw-r--r-- | net/batman-adv/bat_iv_ogm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index dc53798ebb47..ec351199c652 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c | |||
@@ -575,8 +575,7 @@ static void bat_iv_ogm_schedule(struct hard_iface *hard_iface, | |||
575 | htonl((uint32_t)atomic_read(&hard_iface->seqno)); | 575 | htonl((uint32_t)atomic_read(&hard_iface->seqno)); |
576 | 576 | ||
577 | batman_ogm_packet->ttvn = atomic_read(&bat_priv->ttvn); | 577 | batman_ogm_packet->ttvn = atomic_read(&bat_priv->ttvn); |
578 | batman_ogm_packet->tt_crc = htons((uint16_t) | 578 | batman_ogm_packet->tt_crc = htons(bat_priv->tt_crc); |
579 | atomic_read(&bat_priv->tt_crc)); | ||
580 | if (tt_num_changes >= 0) | 579 | if (tt_num_changes >= 0) |
581 | batman_ogm_packet->tt_num_changes = tt_num_changes; | 580 | batman_ogm_packet->tt_num_changes = tt_num_changes; |
582 | 581 | ||