nvme: fix eui_show() print format
authorJavier González <jg@lightnvm.io>
Wed, 8 Nov 2017 09:59:04 +0000 (10:59 +0100)
committerJens Axboe <axboe@kernel.dk>
Sat, 11 Nov 2017 02:53:25 +0000 (19:53 -0700)
Fix print formatting, but keep the original output to prevent user
breakage as suggested by Joe Perches.

Signed-off-by: Javier González <javier@cnexlabs.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c

index 8a60cc786220bfc7227e23cb548f9073d6e98340..6c79b73fe2c3995f0185146c44f9524fdc75f5c1 100644 (file)
@@ -2190,7 +2190,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);