From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [Xen-devel] Fwd: BUG in linux+v3.2.1/drivers/xen/xen-pciback/pci_stub.c Date: Thu, 26 Jan 2012 22:05:33 -0500 Message-ID: <20120127030533.GA20352@phenom.dumpdata.com> References: <20120125163910.GC23999@phenom.dumpdata.com> <20120125212214.GA29571@phenom.dumpdata.com> <4F212835020000780006F264@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <4F212835020000780006F264@nat28.tlf.novell.com> Sender: linux-kernel-owner@vger.kernel.org To: Jan Beulich Cc: socketpair@gmail.com, xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org List-Id: xen-devel@lists.xenproject.org On Thu, Jan 26, 2012 at 09:17:25AM +0000, Jan Beulich wrote: > >>> On 25.01.12 at 22:22, Konrad Rzeszutek Wilk wrote: > > --- a/drivers/xen/xen-pciback/xenbus.c > > +++ b/drivers/xen/xen-pciback/xenbus.c > > @@ -206,8 +206,9 @@ static int xen_pcibk_publish_pci_dev(struct > > xen_pcibk_device *pdev, > > goto out; > > } > > > > + /* TODO: implement feature-use-decimal-for-devfn */ > > err = xenbus_printf(XBT_NIL, pdev->xdev->nodename, str, > > - "%04x:%02x:%02x.%02x", domain, bus, > > + "%04x:%02x:%02x.%1x", domain, bus, > > PCI_SLOT(devfn), PCI_FUNC(devfn)); > > > > out: > > If you are concerned about compatibility (as the added comment > suggests), then removing the leading zero is not an option either. > > However, as long as all parsers of the string use plain %x or %d, > there's no issue here and you could as well use %d here too (as > PCI functions are always in the 0-7 range, which is identically > represented in octal [important for the case of a leading zero], > decimal, and hex). > > Bottom line - just add the comment here, and leave the format > unchanged, or change the format to %d right away. Yeah, I was thinking of leaving it as is. I think I got a bit overzealous on changing all the patch sites and ignored my own comment. > > Jan