linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fusion: print lan address via %pMR
@ 2012-07-12  7:55 Andy Shevchenko
  2013-05-28  8:46 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2012-07-12  7:55 UTC (permalink / raw)
  To: linux-scsi, Eric Moore, DL-MPTFusionLinux; +Cc: Andy Shevchenko

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/message/fusion/mptbase.c |   14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index d99db56..d202f25 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -2562,10 +2562,7 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag)
 				(void) GetLanConfigPages(ioc);
 				a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow;
 				dprintk(ioc, printk(MYIOC_s_DEBUG_FMT
-					"LanAddr = %02X:%02X:%02X"
-					":%02X:%02X:%02X\n",
-					ioc->name, a[5], a[4],
-					a[3], a[2], a[1], a[0]));
+					"LanAddr = %pMR\n", ioc->name, a));
 			}
 			break;
 
@@ -6785,8 +6782,7 @@ static int mpt_iocinfo_proc_show(struct seq_file *m, void *v)
 		if (ioc->bus_type == FC) {
 			if (ioc->pfacts[p].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN) {
 				u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow;
-				seq_printf(m, "    LanAddr = %02X:%02X:%02X:%02X:%02X:%02X\n",
-						a[5], a[4], a[3], a[2], a[1], a[0]);
+				seq_printf(m, "    LanAddr = %pMR\n", a);
 			}
 			seq_printf(m, "    WWN = %08X%08X:%08X%08X\n",
 					ioc->fc_port_page0[p].WWNN.High,
@@ -6863,8 +6859,7 @@ mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buffer, int *size, int len, int sh
 
 	if (showlan && (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN)) {
 		u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow;
-		y += sprintf(buffer+len+y, ", LanAddr=%02X:%02X:%02X:%02X:%02X:%02X",
-			a[5], a[4], a[3], a[2], a[1], a[0]);
+		y += sprintf(buffer+len+y, ", LanAddr=%pMR", a);
 	}
 
 	y += sprintf(buffer+len+y, ", IRQ=%d", ioc->pci_irq);
@@ -6897,8 +6892,7 @@ static void seq_mpt_print_ioc_summary(MPT_ADAPTER *ioc, struct seq_file *m, int
 
 	if (showlan && (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN)) {
 		u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow;
-		seq_printf(m, ", LanAddr=%02X:%02X:%02X:%02X:%02X:%02X",
-			a[5], a[4], a[3], a[2], a[1], a[0]);
+		seq_printf(m, ", LanAddr=%pMR", a);
 	}
 
 	seq_printf(m, ", IRQ=%d", ioc->pci_irq);
-- 
1.7.10.4


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

* Re: [PATCH] fusion: print lan address via %pMR
  2012-07-12  7:55 [PATCH] fusion: print lan address via %pMR Andy Shevchenko
@ 2013-05-28  8:46 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2013-05-28  8:46 UTC (permalink / raw)
  To: linux-scsi; +Cc: Eric Moore, DL-MPTFusionLinux, James E.J. Bottomley


On Thu, 2012-07-12 at 10:55 +0300, Andy Shevchenko wrote: 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/message/fusion/mptbase.c |   14 ++++----------
>  1 file changed, 4 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
> index d99db56..d202f25 100644
> --- a/drivers/message/fusion/mptbase.c
> +++ b/drivers/message/fusion/mptbase.c
> @@ -2562,10 +2562,7 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag)
>  				(void) GetLanConfigPages(ioc);
>  				a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow;
>  				dprintk(ioc, printk(MYIOC_s_DEBUG_FMT
> -					"LanAddr = %02X:%02X:%02X"
> -					":%02X:%02X:%02X\n",
> -					ioc->name, a[5], a[4],
> -					a[3], a[2], a[1], a[0]));
> +					"LanAddr = %pMR\n", ioc->name, a));
>  			}
>  			break;
>  
> @@ -6785,8 +6782,7 @@ static int mpt_iocinfo_proc_show(struct seq_file *m, void *v)
>  		if (ioc->bus_type == FC) {
>  			if (ioc->pfacts[p].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN) {
>  				u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow;
> -				seq_printf(m, "    LanAddr = %02X:%02X:%02X:%02X:%02X:%02X\n",
> -						a[5], a[4], a[3], a[2], a[1], a[0]);
> +				seq_printf(m, "    LanAddr = %pMR\n", a);
>  			}
>  			seq_printf(m, "    WWN = %08X%08X:%08X%08X\n",
>  					ioc->fc_port_page0[p].WWNN.High,
> @@ -6863,8 +6859,7 @@ mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buffer, int *size, int len, int sh
>  
>  	if (showlan && (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN)) {
>  		u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow;
> -		y += sprintf(buffer+len+y, ", LanAddr=%02X:%02X:%02X:%02X:%02X:%02X",
> -			a[5], a[4], a[3], a[2], a[1], a[0]);
> +		y += sprintf(buffer+len+y, ", LanAddr=%pMR", a);
>  	}
>  
>  	y += sprintf(buffer+len+y, ", IRQ=%d", ioc->pci_irq);
> @@ -6897,8 +6892,7 @@ static void seq_mpt_print_ioc_summary(MPT_ADAPTER *ioc, struct seq_file *m, int
>  
>  	if (showlan && (ioc->pfacts[0].ProtocolFlags & MPI_PORTFACTS_PROTOCOL_LAN)) {
>  		u8 *a = (u8*)&ioc->lan_cnfg_page1.HardwareAddressLow;
> -		seq_printf(m, ", LanAddr=%02X:%02X:%02X:%02X:%02X:%02X",
> -			a[5], a[4], a[3], a[2], a[1], a[0]);
> +		seq_printf(m, ", LanAddr=%pMR", a);
>  	}
>  
>  	seq_printf(m, ", IRQ=%d", ioc->pci_irq);

James, do you have any comments on this one?

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

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

end of thread, other threads:[~2013-05-28  8:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-12  7:55 [PATCH] fusion: print lan address via %pMR Andy Shevchenko
2013-05-28  8:46 ` Andy Shevchenko

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