[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <2AC384A2-C792-45AF-AF11-89CBC128C527@lightnvm.io>
Date: Sat, 4 Nov 2017 12:22:20 +0100
From: Javier González <jg@...htnvm.io>
To: Joe Perches <joe@...ches.com>
Cc: Christoph Hellwig <hch@....de>, Sagi Grimberg <sagi@...mberg.me>,
Keith Busch <keith.busch@...el.com>,
linux-nvme@...ts.infradead.org, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] nvme: fix eui_show() print format
> On 3 Nov 2017, at 16.16, Joe Perches <joe@...ches.com> wrote:
>
> On Fri, 2017-11-03 at 13:55 +0100, Christoph Hellwig wrote:
>> On Fri, Nov 03, 2017 at 11:02:50AM +0100, Javier González wrote:
>>> Signed-off-by: Javier González <javier@...xlabs.com>
> []
>>> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> []
>>> @@ -2108,7 +2108,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, "%8phD\n", ns->eui);
>>> }
>>> static DEVICE_ATTR(eui, S_IRUGO, eui_show, NULL);
>>
>> This looks correct. I wonder what the old code printed - does someone
>> have a device with an EUI-64 at hand to quickly cross check what we
>> did before?
>
> It uses spaces between bytes and not dashes.
>
> The code has been this way a couple years now.
>
> I think this proposal, while it might fix an
> unintentional output style, could also be an API
> and could cause user breakage if changed.
>
> Perhaps this should just become
>
> %8ph
>
> without D
That would be ok with me.
Javier.
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists