2017-11-08 10:01:07

by Javier González

[permalink] [raw]
Subject: [PATCH v2] nvme: fix eui_show() print format

From: Javier González <[email protected]>

Fix print formatting, but keep the original output to prevent user
breakage as suggested by Joe Perches.

Change since v1:
- Maintain the original output format printing spaces instead of dashes

Signed-off-by: Javier González <[email protected]>
Reviewed-by: Keith Busch <[email protected]>
---
drivers/nvme/host/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index b3bc9fb39a6c..6c9d313c6f90 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2109,7 +2109,7 @@ static ssize_t eui_show(struct device *dev, struct device_attribute *attr,
char *buf)
{
struct nvme_ns *ns = nvme_get_ns_from_dev(dev);
- return sprintf(buf, "%8phd\n", ns->eui);
+ return sprintf(buf, "%8ph\n", ns->eui);
}
static DEVICE_ATTR(eui, S_IRUGO, eui_show, NULL);

--
2.7.4


From 1583504846825889851@xxx Wed Nov 08 13:31:42 +0000 2017
X-GM-THRID: 1583504846825889851
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread