Staging: batman-adv: Convert MAC_FMT to %pM
authorJoe Perches <joe@perches.com>
Mon, 21 Jun 2010 23:25:46 +0000 (01:25 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 22 Jun 2010 21:05:04 +0000 (14:05 -0700)
Remove the last uses of MAC_FMT

Signed-off-by: Joe Perches <joe@perches.com>
[sven.eckelmann@gmx.de: Adapted for current batman-adv version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/batman-adv/main.c
drivers/staging/batman-adv/translation-table.c

index ed18b08e704b1f84784bb324412a340d3af9c123..72fccb1c52367e2a185228f128cd5bdee3518ec9 100644 (file)
@@ -230,8 +230,7 @@ void dec_module_count(void)
 
 int addr_to_string(char *buff, uint8_t *addr)
 {
-       return sprintf(buff, MAC_FMT,
-                      addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
+       return sprintf(buff, "%pM", addr);
 }
 
 /* returns 1 if they are the same originator */
index 5a0264aac1e886979714fd4f5fe0db519e91f974..d9233b06f13128c16e1cbe3fd455f1cb90c1332e 100644 (file)
@@ -199,13 +199,8 @@ int hna_local_seq_print_text(struct seq_file *seq, void *offset)
        while (hash_iterate(hna_local_hash, &hashit)) {
                hna_local_entry = hashit.bucket->data;
 
-               pos += snprintf(buff + pos, 22, " * " MAC_FMT "\n",
-                               hna_local_entry->addr[0],
-                               hna_local_entry->addr[1],
-                               hna_local_entry->addr[2],
-                               hna_local_entry->addr[3],
-                               hna_local_entry->addr[4],
-                               hna_local_entry->addr[5]);
+               pos += snprintf(buff + pos, 22, " * %pM\n",
+                               hna_local_entry->addr);
        }
 
        spin_unlock_irqrestore(&hna_local_hash_lock, flags);
@@ -417,19 +412,8 @@ int hna_global_seq_print_text(struct seq_file *seq, void *offset)
                hna_global_entry = hashit.bucket->data;
 
                pos += snprintf(buff + pos, 44,
-                               " * " MAC_FMT " via " MAC_FMT "\n",
-                               hna_global_entry->addr[0],
-                               hna_global_entry->addr[1],
-                               hna_global_entry->addr[2],
-                               hna_global_entry->addr[3],
-                               hna_global_entry->addr[4],
-                               hna_global_entry->addr[5],
-                               hna_global_entry->orig_node->orig[0],
-                               hna_global_entry->orig_node->orig[1],
-                               hna_global_entry->orig_node->orig[2],
-                               hna_global_entry->orig_node->orig[3],
-                               hna_global_entry->orig_node->orig[4],
-                               hna_global_entry->orig_node->orig[5]);
+                               " * %pM via %pM\n", hna_global_entry->addr,
+                               hna_global_entry->orig_node->orig);
        }
 
        spin_unlock_irqrestore(&hna_global_hash_lock, flags);