From: Joe Perches <joe@perches.com>
To: Greg Kroah-Hartman <gregkh@suse.de>
Cc: devel <devel@driverdev.osuosl.org>, linux-kernel@vger.kernel.org
Subject: [PATCH] drivers/staging/batman-adv: Convert MAC_FMT to %pM
Date: Wed, 02 Jun 2010 10:10:15 -0700 [thread overview]
Message-ID: <1275498615.23599.12.camel@Joe-Laptop.home> (raw)
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);
next reply other threads:[~2010-06-02 17:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-02 17:10 Joe Perches [this message]
2010-06-02 18:12 ` [PATCH] drivers/staging/batman-adv: Use (pr|netdev)_<level> macro helpers Joe Perches
2010-06-02 18:53 ` [PATCH] drivers/staging/batman-adv: Convert MAC_FMT to %pM Greg KH
2010-06-02 20:08 ` [PATCH] MAINTAINERS: Add staging/b.a.t.m.a.n Joe Perches
2010-06-02 20:17 ` Greg KH
2010-06-02 20:19 ` Randy Dunlap
2010-06-02 20:27 ` Joe Perches
2010-06-02 20:11 ` [PATCH] drivers/staging/batman-adv: Use (pr|netdev)_<level> macro helpers Joe Perches
2010-06-15 22:23 ` [B.A.T.M.A.N.] " Sven Eckelmann
2010-06-15 22:37 ` Sven Eckelmann
2010-06-15 22:58 ` Joe Perches
-- strict thread matches above, loose matches on Subject: below --
2010-06-02 20:10 [PATCH] drivers/staging/batman-adv: Convert MAC_FMT to %pM Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1275498615.23599.12.camel@Joe-Laptop.home \
--to=joe@perches.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).