linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/message/i2o/i2o_proc.c: use %pM to show MAC address
@ 2010-01-05 16:51 H Hartley Sweeten
  2010-01-07  9:18 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: H Hartley Sweeten @ 2010-01-05 16:51 UTC (permalink / raw)
  To: Linux Kernel; +Cc: davem

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: David S. Miller <davem@davemloft.net>

---

Repost due to merge issues.

diff --git a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c
index 7045c45..949a648 100644
--- a/drivers/message/i2o/i2o_proc.c
+++ b/drivers/message/i2o/i2o_proc.c
@@ -111,10 +111,7 @@ static int print_serial_number(struct seq_file *seq, u8 * serialno, int max_len)
 		break;
 
 	case I2O_SNFORMAT_LAN48_MAC:	/* LAN-48 MAC Address */
-		seq_printf(seq,
-			   "LAN-48 MAC address @ %02X:%02X:%02X:%02X:%02X:%02X",
-			   serialno[2], serialno[3],
-			   serialno[4], serialno[5], serialno[6], serialno[7]);
+		seq_printf(seq, "LAN-48 MAC address @ %pM", &serialno[2]);
 		break;
 
 	case I2O_SNFORMAT_WAN:	/* WAN MAC Address */
@@ -126,10 +123,8 @@ static int print_serial_number(struct seq_file *seq, u8 * serialno, int max_len)
 	case I2O_SNFORMAT_LAN64_MAC:	/* LAN-64 MAC Address */
 		/* FIXME: Figure out what a LAN-64 address really looks like?? */
 		seq_printf(seq,
-			   "LAN-64 MAC address @ [?:%02X:%02X:?] %02X:%02X:%02X:%02X:%02X:%02X",
-			   serialno[8], serialno[9],
-			   serialno[2], serialno[3],
-			   serialno[4], serialno[5], serialno[6], serialno[7]);
+			   "LAN-64 MAC address @ [?:%02X:%02X:?] %pM",
+			   serialno[8], serialno[9], &serialno[2]);
 		break;
 
 	case I2O_SNFORMAT_DDM:	/* I2O DDM */

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

* Re: [PATCH] drivers/message/i2o/i2o_proc.c: use %pM to show MAC address
  2010-01-05 16:51 [PATCH] drivers/message/i2o/i2o_proc.c: use %pM to show MAC address H Hartley Sweeten
@ 2010-01-07  9:18 ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-01-07  9:18 UTC (permalink / raw)
  To: hartleys; +Cc: linux-kernel

From: H Hartley Sweeten <hartleys@visionengravers.com>
Date: Tue, 5 Jan 2010 09:51:29 -0700

> Use the %pM kernel extension to display the MAC address.
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>

Applied.

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

* Re: [PATCH] drivers/message/i2o/i2o_proc.c: use %pM to show MAC address
  2009-12-30 19:22 H Hartley Sweeten
@ 2009-12-30 19:33 ` Joe Perches
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Perches @ 2009-12-30 19:33 UTC (permalink / raw)
  To: H Hartley Sweeten; +Cc: linux-kernel

On Wed, 2009-12-30 at 14:22 -0500, H Hartley Sweeten wrote:
> Use the %pM kernel extension to display the MAC address.
> diff --git a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c
> index 7045c45..949a648 100644
> --- a/drivers/message/i2o/i2o_proc.c
> +++ b/drivers/message/i2o/i2o_proc.c
> @@ -111,10 +111,7 @@ static int print_serial_number(struct seq_file *seq, u8 * serialno, int max_len)
>  		break;
>  
>  	case I2O_SNFORMAT_LAN48_MAC:	/* LAN-48 MAC Address */
> -		seq_printf(seq,
> -			   "LAN-48 MAC address @ %02X:%02X:%02X:%02X:%02X:%02X",
> -			   serialno[2], serialno[3],
> -			   serialno[4], serialno[5], serialno[6], serialno[7]);
> +		seq_printf(seq, "LAN-48 MAC address @ %pM", &serialno[2]);
>  		break;
>  
>  	case I2O_SNFORMAT_WAN:	/* WAN MAC Address */
> @@ -126,10 +123,8 @@ static int print_serial_number(struct seq_file *seq, u8 * serialno, int max_len)
>  	case I2O_SNFORMAT_LAN64_MAC:	/* LAN-64 MAC Address */
>  		/* FIXME: Figure out what a LAN-64 address really looks like?? */
>  		seq_printf(seq,
> -			   "LAN-64 MAC address @ [?:%02X:%02X:?] %02X:%02X:%02X:%02X:%02X:%02X",
> -			   serialno[8], serialno[9],
> -			   serialno[2], serialno[3],
> -			   serialno[4], serialno[5], serialno[6], serialno[7]);
> +			   "LAN-64 MAC address @ [?:%02X:%02X:?] %pM",
> +			   serialno[8], serialno[9], &serialno[2]);

User visible change but low probability to break things


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

* [PATCH] drivers/message/i2o/i2o_proc.c: use %pM to show MAC address
@ 2009-12-30 19:22 H Hartley Sweeten
  2009-12-30 19:33 ` Joe Perches
  0 siblings, 1 reply; 4+ messages in thread
From: H Hartley Sweeten @ 2009-12-30 19:22 UTC (permalink / raw)
  To: linux-kernel

Use the %pM kernel extension to display the MAC address.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>

---

diff --git a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c
index 7045c45..949a648 100644
--- a/drivers/message/i2o/i2o_proc.c
+++ b/drivers/message/i2o/i2o_proc.c
@@ -111,10 +111,7 @@ static int print_serial_number(struct seq_file *seq, u8 * serialno, int max_len)
 		break;
 
 	case I2O_SNFORMAT_LAN48_MAC:	/* LAN-48 MAC Address */
-		seq_printf(seq,
-			   "LAN-48 MAC address @ %02X:%02X:%02X:%02X:%02X:%02X",
-			   serialno[2], serialno[3],
-			   serialno[4], serialno[5], serialno[6], serialno[7]);
+		seq_printf(seq, "LAN-48 MAC address @ %pM", &serialno[2]);
 		break;
 
 	case I2O_SNFORMAT_WAN:	/* WAN MAC Address */
@@ -126,10 +123,8 @@ static int print_serial_number(struct seq_file *seq, u8 * serialno, int max_len)
 	case I2O_SNFORMAT_LAN64_MAC:	/* LAN-64 MAC Address */
 		/* FIXME: Figure out what a LAN-64 address really looks like?? */
 		seq_printf(seq,
-			   "LAN-64 MAC address @ [?:%02X:%02X:?] %02X:%02X:%02X:%02X:%02X:%02X",
-			   serialno[8], serialno[9],
-			   serialno[2], serialno[3],
-			   serialno[4], serialno[5], serialno[6], serialno[7]);
+			   "LAN-64 MAC address @ [?:%02X:%02X:?] %pM",
+			   serialno[8], serialno[9], &serialno[2]);
 		break;
 
 	case I2O_SNFORMAT_DDM:	/* I2O DDM */ 

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

end of thread, other threads:[~2010-01-07  9:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-05 16:51 [PATCH] drivers/message/i2o/i2o_proc.c: use %pM to show MAC address H Hartley Sweeten
2010-01-07  9:18 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2009-12-30 19:22 H Hartley Sweeten
2009-12-30 19:33 ` Joe Perches

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