Re: [PATCH v6 07/12] Add async PF initialization to PV guest.

From: Avi Kivity
Date: Sat Oct 09 2010 - 14:45:22 EST


On 10/08/2010 09:54 AM, Gleb Natapov wrote:
> >+
> >+static void kvm_guest_cpu_notify(void *dummy)
> >+{
> >+ if (!dummy)
> >+ kvm_guest_cpu_init();
> >+ else
> >+ kvm_pv_disable_apf(NULL);
> >+}
>
> Why are you making decisions based on a dummy input?
>
> The whole thing looks strange. Use two functions?
>
What is so strange? Type of notification is passed as a parameter.
The code that does this is just under the function. I can rename
dummy to something else. Or make it two functions.

Two separate functions is simplest.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/