From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: socketpair@gmail.com, xen-devel@lists.xensource.com,
linux-kernel@vger.kernel.org
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 [thread overview]
Message-ID: <20120127030533.GA20352@phenom.dumpdata.com> (raw)
In-Reply-To: <4F212835020000780006F264@nat28.tlf.novell.com>
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@oracle.com> 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
prev parent reply other threads:[~2012-01-27 3:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAEmTpZHkKB29FLWqs0R=uD1zXBOJkfSstGgMM=8bA1VVXGT+wQ@mail.gmail.com>
2012-01-25 10:20 ` Fwd: BUG in linux+v3.2.1/drivers/xen/xen-pciback/pci_stub.c Марк Коренберг
2012-01-25 16:39 ` Konrad Rzeszutek Wilk
2012-01-25 21:22 ` Konrad Rzeszutek Wilk
2012-01-26 9:17 ` [Xen-devel] " Jan Beulich
2012-01-27 3:05 ` Konrad Rzeszutek Wilk [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120127030533.GA20352@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=socketpair@gmail.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).