diff options
author | Sven Eckelmann <sven@narfation.org> | 2016-07-22 01:30:10 +0200 |
---|---|---|
committer | Simon Wunderlich <sw@simonwunderlich.de> | 2016-10-17 16:28:46 +0200 |
commit | c408c1b9d49077bd6f0e267292fd35624bac76fb (patch) | |
tree | 8e60ef9b03101d947d866c9fd8f3332ac7eaca58 /net/batman-adv/main.h | |
parent | 739ae86cd2b34ba078cee7492d22283f5500ed19 (diff) | |
download | linux-c408c1b9d49077bd6f0e267292fd35624bac76fb.tar.gz |
batman-adv: Move batadv_sum_counter to soft-interface.c
The function batadv_sum_counter is only used in soft-interface.c and has no
special relevance for main.h.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/main.h')
-rw-r--r-- | net/batman-adv/main.h | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h index 8b0979bed51c..6a2328d17709 100644 --- a/net/batman-adv/main.h +++ b/net/batman-adv/main.h @@ -185,7 +185,6 @@ enum batadv_uev_type { #include <linux/bitops.h> /* for packet.h */ #include <linux/compiler.h> -#include <linux/cpumask.h> #include <linux/etherdevice.h> #include <linux/if_ether.h> /* for packet.h */ #include <linux/if_vlan.h> @@ -284,26 +283,6 @@ static inline void batadv_add_counter(struct batadv_priv *bat_priv, size_t idx, #define batadv_inc_counter(b, i) batadv_add_counter(b, i, 1) -/** - * batadv_sum_counter - Sum the cpu-local counters for index 'idx' - * @bat_priv: the bat priv with all the soft interface information - * @idx: index of counter to sum up - * - * Return: sum of all cpu-local counters - */ -static inline u64 batadv_sum_counter(struct batadv_priv *bat_priv, size_t idx) -{ - u64 *counters, sum = 0; - int cpu; - - for_each_possible_cpu(cpu) { - counters = per_cpu_ptr(bat_priv->bat_counters, cpu); - sum += counters[idx]; - } - - return sum; -} - /* Define a macro to reach the control buffer of the skb. The members of the * control buffer are defined in struct batadv_skb_cb in types.h. * The macro is inspired by the similar macro TCP_SKB_CB() in tcp.h. |