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

Re: [Xen-devel] [PATCH 2/3] x86/sysctl: Clean up XEN_SYSCTL_cpu_hotplug



>>> On 03.04.19 at 11:06, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 03/04/2019 09:53, Jan Beulich wrote:
>>>>> On 02.04.19 at 21:57, <andrew.cooper3@xxxxxxxxxx> wrote:
>>> --- a/xen/arch/x86/sysctl.c
>>> +++ b/xen/arch/x86/sysctl.c
>>> @@ -137,27 +137,35 @@ long arch_do_sysctl(
>>>      case XEN_SYSCTL_cpu_hotplug:
>>>      {
>>>          unsigned int cpu = sysctl->u.cpu_hotplug.cpu;
>>> +        bool plug;
>>> +        long (*fn)(void *) = NULL;
>>> +        void *hcpu = NULL;
>> May I ask that you consistently initialize (or not) all three new
>> variables you introduce?
> 
> I noticed this while posting.  Not would allow the compiler to notice
> when fn wasn't selected, but hvcpu is going to end up with an
> initialiser by the next patch.

Right, I've noticed the need for hcpu to stay as is while looking at
patch 3. Before you remove the other initializer, though - are you
sure you don't need to instead add one, for older gcc to not choke?

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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