b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] drivers/staging/batman-adv: Convert MAC_FMT to %pM
@ 2010-06-02 20:10 Joe Perches
  2010-06-02 23:23 ` Sven Eckelmann
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Joe Perches @ 2010-06-02 20:10 UTC (permalink / raw)
  To: Marek Lindner, Simon Wunderlich, Andrew Lunn, Greg Kroah-Hartman
  Cc: devel, b.a.t.m.a.n, linux-kernel

Remove the last uses of MAC_FMT

Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/staging/batman-adv/main.c              |    3 +-
 drivers/staging/batman-adv/translation-table.c |   25 ++++-------------------
 2 files changed, 6 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/batman-adv/main.c b/drivers/staging/batman-adv/main.c
index 74c70d5..72851cd 100644
--- a/drivers/staging/batman-adv/main.c
+++ b/drivers/staging/batman-adv/main.c
@@ -226,8 +226,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 */
diff --git a/drivers/staging/batman-adv/translation-table.c b/drivers/staging/batman-adv/translation-table.c
index e01ff21..63d0967 100644
--- a/drivers/staging/batman-adv/translation-table.c
+++ b/drivers/staging/batman-adv/translation-table.c
@@ -202,13 +202,8 @@ int hna_local_fill_buffer_text(struct net_device *net_dev, char *buff,
 		hna_local_entry = hashit.bucket->data;
 
 		bytes_written += snprintf(buff + bytes_written, 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]);
+					  " * %pM\n",
+					  hna_local_entry->addr);
 	}
 
 	spin_unlock_irqrestore(&hna_local_hash_lock, flags);
@@ -420,19 +415,9 @@ int hna_global_fill_buffer_text(struct net_device *net_dev, char *buff,
 		hna_global_entry = hashit.bucket->data;
 
 		bytes_written += snprintf(buff + bytes_written, 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);




^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-06-05 17:44 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-02 20:10 [B.A.T.M.A.N.] [PATCH] drivers/staging/batman-adv: Convert MAC_FMT to %pM Joe Perches
2010-06-02 23:23 ` Sven Eckelmann
2010-06-02 23:32   ` Joe Perches
2010-06-02 23:33     ` Sven Eckelmann
2010-06-02 23:47       ` Joe Perches
2010-06-02 23:56         ` Sven Eckelmann
2010-06-03  0:20           ` Joe Perches
2010-06-03  9:15             ` Marek Lindner
2010-06-03 14:45               ` Greg KH
2010-06-03 13:58 ` Sven Eckelmann
2010-06-03 14:39 ` [B.A.T.M.A.N.] [PATCH-trunk] " Sven Eckelmann
2010-06-03 14:44   ` [B.A.T.M.A.N.] [PATCH-maint] " Sven Eckelmann
2010-06-03 14:51   ` [B.A.T.M.A.N.] [PATCH-trunk] " Sven Eckelmann
2010-06-04 14:18 ` [B.A.T.M.A.N.] [PATCHv2-trunk] batman-adv: " Sven Eckelmann
2010-06-04 14:19   ` Sven Eckelmann
2010-06-04 14:24   ` [B.A.T.M.A.N.] [PATCHv2-maint] " Sven Eckelmann
2010-06-05 17:44   ` [B.A.T.M.A.N.] [PATCHv2-trunk] " Simon Wunderlich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).