xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Alex Sharp <alex.sharp@orionvm.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH] Fix stubdom build failure for RELEASE-4.3.1
Date: Thu, 31 Oct 2013 19:00:16 +0100	[thread overview]
Message-ID: <20131031180016.GO7325@type.youpi.perso.aquilenet.fr> (raw)
In-Reply-To: <52726FD4.6070300@citrix.com>

Andrew Cooper, le Thu 31 Oct 2013 14:57:24 +0000, a écrit :
>     diff --git a/extras/mini-os/pcifront.c b/extras/mini-os/pcifront.c
>     index bbe21e0..9d0cb17 100644
>     --- a/extras/mini-os/pcifront.c
>     +++ b/extras/mini-os/pcifront.c
>     @@ -413,7 +413,7 @@ int pcifront_physical_to_virtual (struct pcifront_dev
>     *dev,
>                      continue;
>                  }
>      
>     -            if (sscanf(s, "%x:%x:%x.%x", dom, bus, slot, fun) != 4) {
>     +            if (sscanf(s, "%x:%x:%x.%lx", dom, bus, slot, fun) != 4) {
> 
> 
> This is a little awkward.  It has been changed in unstable and is now correct. 

Mmm, I don't see it fixed in unstable.  I wonder why fun is an
unsigned long at all, it is even passed unsigned ints in callers.
pcifront_physical_to_virtual and pcifront_conf_read should just use
unsigned int.

>     @@ -769,7 +769,7 @@ domid_t xenbus_get_self_id(void)
>          domid_t ret;
>      
>          BUG_ON(xenbus_read(XBT_NIL, "domid", &dom_id));
>     -    sscanf(dom_id, "%d", &ret);
>     +    sscanf(dom_id, "%u", (unsigned int*)&ret);
> 
> 
> This needs to be
> 
> sscanf(dom_id, "%"SCNd16, &ret);

Mmm, perhaps rather make ret itself an unsigned int? I'd rather not
hardcode here what a domid_t is.

I agree on the rest.

Samuel

  reply	other threads:[~2013-10-31 18:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-31 14:44 [PATCH] Fix stubdom build failure for RELEASE-4.3.1 Alex Sharp
2013-10-31 14:57 ` Andrew Cooper
2013-10-31 18:00   ` Samuel Thibault [this message]
2014-01-20 16:46 ` stubdom build failure with gcc 4.8 (Was: Re: [PATCH] Fix stubdom build failure for RELEASE-4.3.1) Ian Campbell
2014-01-20 17:00   ` Processed: " xen

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=20131031180016.GO7325@type.youpi.perso.aquilenet.fr \
    --to=samuel.thibault@ens-lyon.org \
    --cc=alex.sharp@orionvm.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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).