All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Chong Li <lichong659@gmail.com>
Cc: Chong Li <chong.li@wustl.edu>, Wei Liu <wei.liu2@citrix.com>,
	Sisu Xi <xisisu@gmail.com>,
	George Dunlap <george.dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Dario Faggioli <dario.faggioli@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	xen-devel <xen-devel@lists.xen.org>,
	Meng Xu <mengxu@cis.upenn.edu>,
	Dagaen Golomb <dgolomb@seas.upenn.edu>
Subject: Re: [PATCH v9 for Xen 4.7 3/4] libxl: enable per-VCPU parameter for RTDS
Date: Wed, 6 Apr 2016 20:49:45 +0100	[thread overview]
Message-ID: <20160406194945.GB14830@citrix.com> (raw)
In-Reply-To: <CAGHO-ipbtuyFa9TH1zk5Z_7m1ssNGpo6fv7XFF_HFp08ABTC=w@mail.gmail.com>

On Wed, Apr 06, 2016 at 02:41:31PM -0500, Chong Li wrote:
> On Wed, Apr 6, 2016 at 2:30 PM, Wei Liu <wei.liu2@citrix.com> wrote:
> > On Wed, Apr 06, 2016 at 02:20:55PM -0500, Chong Li wrote:
> >> On Wed, Apr 6, 2016 at 1:54 PM, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
> >> > On 06/04/16 17:41, Chong Li wrote:
> >> >> On Wed, Apr 6, 2016 at 11:36 AM, Dario Faggioli
> >> >> <dario.faggioli@citrix.com> wrote:
> >> >>> On Wed, 2016-04-06 at 16:38 +0100, Ian Jackson wrote:
> >> >>>> Ian Jackson writes ("Re: [PATCH v9 for Xen 4.7 3/4] libxl: enable
> >> >>>> per-VCPU parameter for RTDS"):
> >> >>>>> Dario points out on irc that perhaps the problem is that I didn't
> >> >>>>> apply 2/4.  I wasn't CC'd on 2/4, so I foolishly assumed it was a
> >> >>>>> hypervisor patch (and the HV parts are already in tree).
> >> >>>>>
> >> >>>>> I will check my view of the xen-devel list.
> >> >>>> Indeed.  With 2/4 it builds.  4/4 was also not CC'd to me.  I used a
> >> >>>> copy from the list.
> >> >>>>
> >> >>>> I have pushed all four.
> >> >>>>
> >> >>> Thanks Ian!
> >> >>>
> >> >>> So, Chong, clearly, the build failure was not your fault (as there is
> >> >>> no actual build failure), but please, always double check (even when
> >> >>> sending new versions of a series) that the appropriate maintainers are
> >> >>> Cc-ed... This would help limiting problems like this one we've seen
> >> >>> here.
> >> >>>
> >> >> Yes, I'll.
> >> >>
> >> >> Thanks for your help on this.
> >> >> Chong
> >> >
> >> > Yet another build failure on CentOS.
> >> >
> >> > xc_rt.c: In function 'xc_sched_rtds_vcpu_set':
> >> > xc_rt.c:71:9: error: 'rc' may be used uninitialized in this function
> >> > [-Werror=maybe-uninitialized]
> >> >      int rc;
> >> >          ^
> >> > xc_rt.c: In function 'xc_sched_rtds_vcpu_get':
> >> > xc_rt.c:105:9: error: 'rc' may be used uninitialized in this function
> >> > [-Werror=maybe-uninitialized]
> >> >      int rc;
> >> >          ^
> >> > cc1: all warnings being treated as errors
> >> >
> >> > In both cases, if your while loop doesn't execute (i.e. the user passes
> >> > num_vcpus = 0), rc is genuinely uninialised when used at the end of the
> >> > function.
> >> >
> >> > ~Andrew
> >>
> >> I see. I can do a sanity check on num_vcpus before the while loop.
> >>
> >
> > Not sure what kind of sanity check you were thinking about. But you can
> > just set rc = 0 at the beginning of each function. That semantics should
> > be sensible enough. What do you think?
> Yes, I can do this change. But didn't you or Dario say that rc should not be
> initialized at the beginning of a function?
> 

I'm fine with bending the rules a bit to make life easier. For a simple
function like this I won't argue one way or another. Besides there isn't
really a CODING_STYLE file in libxc.

But really what I care about is to not return an uninitialised rc. If
you don't want to set rc to 0 at the beginning of the function, you can
do it before the loop -- that should both fix the error and make Dario
happy. :-)

Wei.

> >
> >> Do I have to re-send the whole patch series? Or maybe just something
> >> like a bug fix patch?
> >>
> >
> > Please send a patch on top of staging branch. This series has already
> > been committed.
> >
> Sure.
> 
> 
> 
> -- 
> Chong Li
> Department of Computer Science and Engineering
> Washington University in St.louis

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-04-06 19:49 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01  4:59 [PATCH v9 for Xen 4.7 0/4] Enable per-VCPU parameter for RTDS Chong Li
2016-04-01  4:59 ` [PATCH v9 for Xen 4.7 1/4] xen: enable " Chong Li
2016-04-01  9:35   ` Jan Beulich
2016-04-01 12:37   ` Dario Faggioli
2016-04-04 15:14   ` [hypervisor deadlock] " Andrew Cooper
2016-04-04 15:58     ` Chong Li
2016-04-04 16:05       ` George Dunlap
2016-04-04 16:32         ` Dario Faggioli
2016-04-04 16:47           ` Wei Liu
2016-04-04 17:22             ` Chong Li
2016-04-01  4:59 ` [PATCH v9 for Xen 4.7 2/4] libxc: " Chong Li
2016-04-01  4:59 ` [PATCH v9 for Xen 4.7 3/4] libxl: " Chong Li
2016-04-01 12:53   ` Dario Faggioli
2016-04-01 13:40   ` Wei Liu
2016-04-06 14:32     ` Ian Jackson
2016-04-06 14:55       ` Ian Jackson
2016-04-06 15:04         ` Wei Liu
2016-04-06 15:22           ` Ian Jackson
2016-04-06 15:38             ` Ian Jackson
2016-04-06 16:36               ` Dario Faggioli
2016-04-06 16:41                 ` Chong Li
2016-04-06 18:54                   ` Andrew Cooper
2016-04-06 19:20                     ` Chong Li
2016-04-06 19:23                       ` Andrew Cooper
2016-04-06 19:30                       ` Wei Liu
2016-04-06 19:41                         ` Chong Li
2016-04-06 19:49                           ` Wei Liu [this message]
2016-04-06 20:01                             ` Dario Faggioli
2016-04-01  4:59 ` [PATCH v9 for Xen 4.7 4/4] xl: " Chong Li
2016-04-01 13:15   ` Dario Faggioli
2016-04-01 13:43     ` Wei Liu
2016-04-01 13:51       ` Dario Faggioli

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=20160406194945.GB14830@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=chong.li@wustl.edu \
    --cc=dario.faggioli@citrix.com \
    --cc=dgolomb@seas.upenn.edu \
    --cc=george.dunlap@eu.citrix.com \
    --cc=lichong659@gmail.com \
    --cc=mengxu@cis.upenn.edu \
    --cc=xen-devel@lists.xen.org \
    --cc=xisisu@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.