]> Pileus Git - ~andy/linux/blobdiff - net/batman-adv/vis.c
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
[~andy/linux] / net / batman-adv / vis.c
index f81a6b668b0c524d33f4f3b7794e2181a1897a9b..cc3b9f2f3b5dde8f524f05d8089fa9adf2384292 100644 (file)
@@ -66,7 +66,7 @@ static int vis_info_cmp(const struct hlist_node *node, const void *data2)
 
 /* hash function to choose an entry in a hash table of given size */
 /* hash algorithm from http://en.wikipedia.org/wiki/Hash_table */
-static int vis_info_choose(const void *data, int size)
+static uint32_t vis_info_choose(const void *data, uint32_t size)
 {
        const struct vis_info *vis_info = data;
        const struct vis_packet *packet;
@@ -96,7 +96,7 @@ static struct vis_info *vis_hash_find(struct bat_priv *bat_priv,
        struct hlist_head *head;
        struct hlist_node *node;
        struct vis_info *vis_info, *vis_info_tmp = NULL;
-       int index;
+       uint32_t index;
 
        if (!hash)
                return NULL;
@@ -202,7 +202,8 @@ int vis_seq_print_text(struct seq_file *seq, void *offset)
        HLIST_HEAD(vis_if_list);
        struct if_list_entry *entry;
        struct hlist_node *pos, *n;
-       int i, j, ret = 0;
+       uint32_t i;
+       int j, ret = 0;
        int vis_server = atomic_read(&bat_priv->vis_mode);
        size_t buff_pos, buf_size;
        char *buff;
@@ -556,7 +557,8 @@ static int find_best_vis_server(struct bat_priv *bat_priv,
        struct hlist_head *head;
        struct orig_node *orig_node;
        struct vis_packet *packet;
-       int best_tq = -1, i;
+       int best_tq = -1;
+       uint32_t i;
 
        packet = (struct vis_packet *)info->skb_packet->data;
 
@@ -607,8 +609,9 @@ static int generate_vis_packet(struct bat_priv *bat_priv)
        struct vis_info *info = bat_priv->my_vis_info;
        struct vis_packet *packet = (struct vis_packet *)info->skb_packet->data;
        struct vis_info_entry *entry;
-       struct tt_local_entry *tt_local_entry;
-       int best_tq = -1, i;
+       struct tt_common_entry *tt_common_entry;
+       int best_tq = -1;
+       uint32_t i;
 
        info->first_seen = jiffies;
        packet->vis_type = atomic_read(&bat_priv->vis_mode);
@@ -669,13 +672,13 @@ next:
                head = &hash->table[i];
 
                rcu_read_lock();
-               hlist_for_each_entry_rcu(tt_local_entry, node, head,
+               hlist_for_each_entry_rcu(tt_common_entry, node, head,
                                         hash_entry) {
                        entry = (struct vis_info_entry *)
                                        skb_put(info->skb_packet,
                                                sizeof(*entry));
                        memset(entry->src, 0, ETH_ALEN);
-                       memcpy(entry->dest, tt_local_entry->addr, ETH_ALEN);
+                       memcpy(entry->dest, tt_common_entry->addr, ETH_ALEN);
                        entry->quality = 0; /* 0 means TT */
                        packet->entries++;
 
@@ -696,7 +699,7 @@ unlock:
  * held */
 static void purge_vis_packets(struct bat_priv *bat_priv)
 {
-       int i;
+       uint32_t i;
        struct hashtable_t *hash = bat_priv->vis_hash;
        struct hlist_node *node, *node_tmp;
        struct hlist_head *head;
@@ -733,7 +736,7 @@ static void broadcast_vis_packet(struct bat_priv *bat_priv,
        struct sk_buff *skb;
        struct hard_iface *hard_iface;
        uint8_t dstaddr[ETH_ALEN];
-       int i;
+       uint32_t i;
 
 
        packet = (struct vis_packet *)info->skb_packet->data;