* [PATCH 1/2] scsi: use kernel's '%pM' format option to print MAC
@ 2012-07-12 7:51 Andy Shevchenko
2012-07-12 7:51 ` [PATCH 2/2] scsi: qla2xxx: print MAC via %pMR Andy Shevchenko
0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2012-07-12 7:51 UTC (permalink / raw)
To: linux-scsi, linux-driver, iscsi-driver
Cc: Andy Shevchenko, Tom Tucker, Steve Wise, linux-rdma
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Tom Tucker <tom@opengridcomputing.com>
Cc: Steve Wise <swise@opengridcomputing.com>
Cc: linux-rdma@vger.kernel.org
---
drivers/scsi/fnic/vnic_dev.c | 10 ++--------
drivers/scsi/qla4xxx/ql4_nx.c | 8 ++------
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/drivers/scsi/fnic/vnic_dev.c b/drivers/scsi/fnic/vnic_dev.c
index b576be7..0cb8ad0 100644
--- a/drivers/scsi/fnic/vnic_dev.c
+++ b/drivers/scsi/fnic/vnic_dev.c
@@ -499,10 +499,7 @@ void vnic_dev_add_addr(struct vnic_dev *vdev, u8 *addr)
err = vnic_dev_cmd(vdev, CMD_ADDR_ADD, &a0, &a1, wait);
if (err)
- printk(KERN_ERR
- "Can't add addr [%02x:%02x:%02x:%02x:%02x:%02x], %d\n",
- addr[0], addr[1], addr[2], addr[3], addr[4], addr[5],
- err);
+ printk(KERN_ERR "Can't add addr [%pM], %d\n", addr, err);
}
void vnic_dev_del_addr(struct vnic_dev *vdev, u8 *addr)
@@ -517,10 +514,7 @@ void vnic_dev_del_addr(struct vnic_dev *vdev, u8 *addr)
err = vnic_dev_cmd(vdev, CMD_ADDR_DEL, &a0, &a1, wait);
if (err)
- printk(KERN_ERR
- "Can't del addr [%02x:%02x:%02x:%02x:%02x:%02x], %d\n",
- addr[0], addr[1], addr[2], addr[3], addr[4], addr[5],
- err);
+ printk(KERN_ERR "Can't del addr [%pM], %d\n", addr, err);
}
int vnic_dev_notify_set(struct vnic_dev *vdev, u16 intr)
diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c
index 228b670..c163767 100644
--- a/drivers/scsi/qla4xxx/ql4_nx.c
+++ b/drivers/scsi/qla4xxx/ql4_nx.c
@@ -2964,12 +2964,8 @@ int qla4_8xxx_get_sys_info(struct scsi_qla_host *ha)
ha->phy_port_num = sys_info->port_num;
ha->iscsi_pci_func_cnt = sys_info->iscsi_pci_func_cnt;
- DEBUG2(printk("scsi%ld: %s: "
- "mac %02x:%02x:%02x:%02x:%02x:%02x "
- "serial %s\n", ha->host_no, __func__,
- ha->my_mac[0], ha->my_mac[1], ha->my_mac[2],
- ha->my_mac[3], ha->my_mac[4], ha->my_mac[5],
- ha->serial_number));
+ DEBUG2(printk("scsi%ld: %s: mac %pM serial %s\n", ha->host_no, __func__,
+ ha->my_mac, ha->serial_number));
status = QLA_SUCCESS;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] scsi: qla2xxx: print MAC via %pMR
2012-07-12 7:51 [PATCH 1/2] scsi: use kernel's '%pM' format option to print MAC Andy Shevchenko
@ 2012-07-12 7:51 ` Andy Shevchenko
2012-07-26 12:23 ` Chad Dupuis
0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2012-07-12 7:51 UTC (permalink / raw)
To: linux-scsi, linux-driver, iscsi-driver; +Cc: Andy Shevchenko
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/scsi/qla2xxx/qla_attr.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 5ab9530..095ba85 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1193,10 +1193,7 @@ qla2x00_vn_port_mac_address_show(struct device *dev,
if (!IS_CNA_CAPABLE(vha->hw))
return snprintf(buf, PAGE_SIZE, "\n");
- return snprintf(buf, PAGE_SIZE, "%02x:%02x:%02x:%02x:%02x:%02x\n",
- vha->fcoe_vn_port_mac[5], vha->fcoe_vn_port_mac[4],
- vha->fcoe_vn_port_mac[3], vha->fcoe_vn_port_mac[2],
- vha->fcoe_vn_port_mac[1], vha->fcoe_vn_port_mac[0]);
+ return snprintf(buf, PAGE_SIZE, "%pMR\n", vha->fcoe_vn_port_mac);
}
static ssize_t
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] scsi: qla2xxx: print MAC via %pMR
2012-07-12 7:51 ` [PATCH 2/2] scsi: qla2xxx: print MAC via %pMR Andy Shevchenko
@ 2012-07-26 12:23 ` Chad Dupuis
2013-05-28 8:44 ` Andy Shevchenko
0 siblings, 1 reply; 4+ messages in thread
From: Chad Dupuis @ 2012-07-26 12:23 UTC (permalink / raw)
To: Andy Shevchenko
Cc: linux-scsi@vger.kernel.org, Dept-Eng Linux Driver,
Dept-Eng iSCSI Driver
On Thu, 12 Jul 2012, Andy Shevchenko wrote:
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/scsi/qla2xxx/qla_attr.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
> index 5ab9530..095ba85 100644
> --- a/drivers/scsi/qla2xxx/qla_attr.c
> +++ b/drivers/scsi/qla2xxx/qla_attr.c
> @@ -1193,10 +1193,7 @@ qla2x00_vn_port_mac_address_show(struct device *dev,
> if (!IS_CNA_CAPABLE(vha->hw))
> return snprintf(buf, PAGE_SIZE, "\n");
>
> - return snprintf(buf, PAGE_SIZE, "%02x:%02x:%02x:%02x:%02x:%02x\n",
> - vha->fcoe_vn_port_mac[5], vha->fcoe_vn_port_mac[4],
> - vha->fcoe_vn_port_mac[3], vha->fcoe_vn_port_mac[2],
> - vha->fcoe_vn_port_mac[1], vha->fcoe_vn_port_mac[0]);
> + return snprintf(buf, PAGE_SIZE, "%pMR\n", vha->fcoe_vn_port_mac);
> }
>
> static ssize_t
>
Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] scsi: qla2xxx: print MAC via %pMR
2012-07-26 12:23 ` Chad Dupuis
@ 2013-05-28 8:44 ` Andy Shevchenko
0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2013-05-28 8:44 UTC (permalink / raw)
To: Chad Dupuis
Cc: linux-scsi@vger.kernel.org, linux-driver, James E.J. Bottomley
On Thu, 2012-07-26 at 08:23 -0400, Chad Dupuis wrote:
>
> On Thu, 12 Jul 2012, Andy Shevchenko wrote:
>
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> > drivers/scsi/qla2xxx/qla_attr.c | 5 +----
> > 1 file changed, 1 insertion(+), 4 deletions(-)
> >
> > diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
> > index 5ab9530..095ba85 100644
> > --- a/drivers/scsi/qla2xxx/qla_attr.c
> > +++ b/drivers/scsi/qla2xxx/qla_attr.c
> > @@ -1193,10 +1193,7 @@ qla2x00_vn_port_mac_address_show(struct device *dev,
> > if (!IS_CNA_CAPABLE(vha->hw))
> > return snprintf(buf, PAGE_SIZE, "\n");
> >
> > - return snprintf(buf, PAGE_SIZE, "%02x:%02x:%02x:%02x:%02x:%02x\n",
> > - vha->fcoe_vn_port_mac[5], vha->fcoe_vn_port_mac[4],
> > - vha->fcoe_vn_port_mac[3], vha->fcoe_vn_port_mac[2],
> > - vha->fcoe_vn_port_mac[1], vha->fcoe_vn_port_mac[0]);
> > + return snprintf(buf, PAGE_SIZE, "%pMR\n", vha->fcoe_vn_port_mac);
> > }
> >
> > static ssize_t
> >
>
> Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
James, do you have any comments on this patch and patch 1/2?
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-28 8:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-12 7:51 [PATCH 1/2] scsi: use kernel's '%pM' format option to print MAC Andy Shevchenko
2012-07-12 7:51 ` [PATCH 2/2] scsi: qla2xxx: print MAC via %pMR Andy Shevchenko
2012-07-26 12:23 ` Chad Dupuis
2013-05-28 8:44 ` 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).