netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] br2684: Remove unnecessary formatting macros b1 and bs
@ 2015-07-31  6:54 Joe Perches
  2015-07-31 22:26 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2015-07-31  6:54 UTC (permalink / raw)
  To: netdev

Use vsprintf extension %pI4 instead.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/atm/br2684.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index cc78538..aa0047c 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -802,13 +802,10 @@ static int br2684_seq_show(struct seq_file *seq, void *v)
 			   (brdev->payload == p_bridged) ? "bridged" : "routed",
 			   brvcc->copies_failed, brvcc->copies_needed);
 #ifdef CONFIG_ATM_BR2684_IPFILTER
-#define b1(var, byte)	((u8 *) &brvcc->filter.var)[byte]
-#define bs(var)		b1(var, 0), b1(var, 1), b1(var, 2), b1(var, 3)
 		if (brvcc->filter.netmask != 0)
-			seq_printf(seq, "    filter=%d.%d.%d.%d/"
-				   "%d.%d.%d.%d\n", bs(prefix), bs(netmask));
-#undef bs
-#undef b1
+			seq_printf(seq, "    filter=%pI4/%pI4\n",
+				   &brvcc->filter.prefix,
+				   &brvcc->filter.netmask);
 #endif /* CONFIG_ATM_BR2684_IPFILTER */
 	}
 	return 0;

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

* Re: [PATCH] br2684: Remove unnecessary formatting macros b1 and bs
  2015-07-31  6:54 [PATCH] br2684: Remove unnecessary formatting macros b1 and bs Joe Perches
@ 2015-07-31 22:26 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-07-31 22:26 UTC (permalink / raw)
  To: joe; +Cc: netdev

From: Joe Perches <joe@perches.com>
Date: Thu, 30 Jul 2015 23:54:28 -0700

> Use vsprintf extension %pI4 instead.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Applied.

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

end of thread, other threads:[~2015-07-31 22:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-31  6:54 [PATCH] br2684: Remove unnecessary formatting macros b1 and bs Joe Perches
2015-07-31 22:26 ` David Miller

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).