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

Re: [Xen-devel] [PATCH v9 for Xen 4.7 3/4] libxl: enable per-VCPU parameter for RTDS



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@xxxxxxxxxx> 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@xxxxxxxxxx> 
> >> wrote:
> >> > On 06/04/16 17:41, Chong Li wrote:
> >> >> On Wed, Apr 6, 2016 at 11:36 AM, Dario Faggioli
> >> >> <dario.faggioli@xxxxxxxxxx> 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@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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