summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <andy.shevchenko@gmail.com>2015-03-15 15:38:47 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-16 15:36:37 (GMT)
commit9a836c0a6310e6e970ff63d030d7213c874ae7af (patch)
tree9bd3067f7c419819dd24a12e87b2484dcc5625ef
parentbdbceb4de3e383a9d434899ef5ba0fe1da6c2a31 (diff)
downloadlinux-9a836c0a6310e6e970ff63d030d7213c874ae7af.tar.xz
staging: unisys: print MAC address via %pM
This patch converts code to use %pM specifier instead of placing each byte on stack. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/unisys/virtpci/virtpci.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/staging/unisys/virtpci/virtpci.c b/drivers/staging/unisys/virtpci/virtpci.c
index cfefdab..3f399e6 100644
--- a/drivers/staging/unisys/virtpci/virtpci.c
+++ b/drivers/staging/unisys/virtpci/virtpci.c
@@ -1310,15 +1310,10 @@ static ssize_t info_debugfs_read(struct file *file, char __user *buf,
tmpvpcidev->scsi.max.cmd_per_lun);
} else {
str_pos += scnprintf(vbuf + str_pos, len - str_pos,
- "[%d:%d] VNic:%02x:%02x:%02x:%02x:%02x:%02x num_rcv_bufs:%d mtu:%d",
+ "[%d:%d] VNic:%pM num_rcv_bufs:%d mtu:%d",
tmpvpcidev->bus_no,
tmpvpcidev->device_no,
- tmpvpcidev->net.mac_addr[0],
- tmpvpcidev->net.mac_addr[1],
- tmpvpcidev->net.mac_addr[2],
- tmpvpcidev->net.mac_addr[3],
- tmpvpcidev->net.mac_addr[4],
- tmpvpcidev->net.mac_addr[5],
+ tmpvpcidev->net.mac_addr,
tmpvpcidev->net.num_rcv_bufs,
tmpvpcidev->net.mtu);
}