From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754919AbdKCPQn (ORCPT ); Fri, 3 Nov 2017 11:16:43 -0400 Received: from smtprelay0099.hostedemail.com ([216.40.44.99]:50536 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754198AbdKCPQl (ORCPT ); Fri, 3 Nov 2017 11:16:41 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3872:4250:4321:5007:7875:10004:10400:10450:10455:10848:11026:11232:11658:11914:12296:12438:12740:12895:13069:13161:13229:13311:13357:13439:13894:14181:14659:14721:19904:19999:21080:21451:21611:21627:30012:30051:30054:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: cart96_1cf2bd8d6a73e X-Filterd-Recvd-Size: 2085 Message-ID: <1509722197.15520.17.camel@perches.com> Subject: Re: [PATCH 3/3] nvme: fix eui_show() print format From: Joe Perches To: Christoph Hellwig , Javier =?ISO-8859-1?Q?Gonz=E1lez?= Cc: sagi@grimberg.me, keith.busch@intel.com, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Javier =?ISO-8859-1?Q?Gonz=E1lez?= Date: Fri, 03 Nov 2017 08:16:37 -0700 In-Reply-To: <20171103125516.GC25186@lst.de> References: <1509703370-20379-1-git-send-email-javier@cnexlabs.com> <1509703370-20379-4-git-send-email-javier@cnexlabs.com> <20171103125516.GC25186@lst.de> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 [] > > 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