Re: [Xen-devel] Fwd: BUG inlinux+v3.2.1/drivers/xen/xen-pciback/pci_stub.c

From: Konrad Rzeszutek Wilk
Date: Thu Jan 26 2012 - 22:08:12 EST


On Thu, Jan 26, 2012 at 09:17:25AM +0000, Jan Beulich wrote:
> >>> On 25.01.12 at 22:22, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/