diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-06-03 16:19:20 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-07-01 16:47:19 -0400 |
commit | d69909d2fc9e00bd8149cc8df9b18c35008e3e62 (patch) | |
tree | 305ce47abad3d2ef055d36b0c9b9808e3555111d /net/batman-adv/soft-interface.c | |
parent | e9a4f295ebe06b00d6af5597c0cea78c315c2ebc (diff) |
batman-adv: Prefix types enum with BATADV_
Reported-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/soft-interface.c')
-rw-r--r-- | net/batman-adv/soft-interface.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c index b77e598fb2b0..19a80d276585 100644 --- a/net/batman-adv/soft-interface.c +++ b/net/batman-adv/soft-interface.c | |||
@@ -366,6 +366,7 @@ struct net_device *batadv_softif_create(const char *name) | |||
366 | struct net_device *soft_iface; | 366 | struct net_device *soft_iface; |
367 | struct bat_priv *bat_priv; | 367 | struct bat_priv *bat_priv; |
368 | int ret; | 368 | int ret; |
369 | size_t cnt_len = sizeof(uint64_t) * BATADV_CNT_NUM; | ||
369 | 370 | ||
370 | soft_iface = alloc_netdev(sizeof(*bat_priv), name, | 371 | soft_iface = alloc_netdev(sizeof(*bat_priv), name, |
371 | batadv_interface_setup); | 372 | batadv_interface_setup); |
@@ -411,8 +412,7 @@ struct net_device *batadv_softif_create(const char *name) | |||
411 | bat_priv->primary_if = NULL; | 412 | bat_priv->primary_if = NULL; |
412 | bat_priv->num_ifaces = 0; | 413 | bat_priv->num_ifaces = 0; |
413 | 414 | ||
414 | bat_priv->bat_counters = __alloc_percpu(sizeof(uint64_t) * BAT_CNT_NUM, | 415 | bat_priv->bat_counters = __alloc_percpu(cnt_len, __alignof__(uint64_t)); |
415 | __alignof__(uint64_t)); | ||
416 | if (!bat_priv->bat_counters) | 416 | if (!bat_priv->bat_counters) |
417 | goto unreg_soft_iface; | 417 | goto unreg_soft_iface; |
418 | 418 | ||
@@ -542,14 +542,14 @@ static void batadv_get_ethtool_stats(struct net_device *dev, | |||
542 | struct bat_priv *bat_priv = netdev_priv(dev); | 542 | struct bat_priv *bat_priv = netdev_priv(dev); |
543 | int i; | 543 | int i; |
544 | 544 | ||
545 | for (i = 0; i < BAT_CNT_NUM; i++) | 545 | for (i = 0; i < BATADV_CNT_NUM; i++) |
546 | data[i] = batadv_sum_counter(bat_priv, i); | 546 | data[i] = batadv_sum_counter(bat_priv, i); |
547 | } | 547 | } |
548 | 548 | ||
549 | static int batadv_get_sset_count(struct net_device *dev, int stringset) | 549 | static int batadv_get_sset_count(struct net_device *dev, int stringset) |
550 | { | 550 | { |
551 | if (stringset == ETH_SS_STATS) | 551 | if (stringset == ETH_SS_STATS) |
552 | return BAT_CNT_NUM; | 552 | return BATADV_CNT_NUM; |
553 | 553 | ||
554 | return -EOPNOTSUPP; | 554 | return -EOPNOTSUPP; |
555 | } | 555 | } |