From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Martin K . Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Sathya Prakash <sathya.prakash@broadcom.com>,
Chaitra P B <chaitra.basappa@broadcom.com>,
Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>
Subject: [PATCH v3 2/6] fusion: print lan address via %pMR
Date: Sat, 22 Oct 2016 20:32:27 +0300 [thread overview]
Message-ID: <20161022173231.170417-3-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20161022173231.170417-1-andriy.shevchenko@linux.intel.com>
LAN MAC addresses can be printed directly using %pMR specifier.
Cc: Sathya Prakash <sathya.prakash@broadcom.com>
Cc: Chaitra P B <chaitra.basappa@broadcom.com>
Cc: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>
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 89c7ed1..f82745c 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -2585,10 +2585,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;
@@ -6783,8 +6780,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,
@@ -6861,8 +6857,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);
@@ -6896,8 +6891,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);
--
2.9.3
next prev parent reply other threads:[~2016-10-22 17:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-22 17:32 [PATCH v3 0/6] scsi: collection of clean ups Andy Shevchenko
2016-10-22 17:32 ` [PATCH v3 1/6] scsi: fnic: use kernel's '%pM' format option to print MAC Andy Shevchenko
2016-10-24 12:29 ` Ewan D. Milne
2016-10-22 17:32 ` Andy Shevchenko [this message]
2016-10-24 12:32 ` [PATCH v3 2/6] fusion: print lan address via %pMR Ewan D. Milne
2016-10-22 17:32 ` [PATCH v3 3/6] scsi: qla4xxx: print MAC and SID via %p[mM][R] Andy Shevchenko
2016-10-24 12:34 ` Ewan D. Milne
2016-10-22 17:32 ` [PATCH v3 4/6] [SCSI] ips: don't use custom hex_asc_upper[] table Andy Shevchenko
2016-10-24 12:34 ` Ewan D. Milne
2016-10-22 17:32 ` [PATCH v3 5/6] scsi: replace custom approach to hexdump small buffers Andy Shevchenko
2016-10-24 12:35 ` Ewan D. Milne
2016-10-22 17:32 ` [PATCH v3 6/6] cciss: replace custom function to hexdump Andy Shevchenko
2016-10-25 2:12 ` [PATCH v3 0/6] scsi: collection of clean ups Martin K. Petersen
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=20161022173231.170417-3-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=chaitra.basappa@broadcom.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sathya.prakash@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.