[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.