[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v7 01/10] x86/hypervisor: make hypervisor_ap_setup return an error code
On 05.02.2020 13:09, Wei Liu wrote: > On Wed, Feb 05, 2020 at 12:12:30PM +0100, Jan Beulich wrote: >> On 04.02.2020 16:36, Wei Liu wrote: >>> @@ -254,14 +260,20 @@ static void __init setup(void) >>> XEN_LEGACY_MAX_VCPUS); >>> } >>> >>> - init_evtchn(); >>> + BUG_ON(init_evtchn()); >>> } >>> >>> -static void ap_setup(void) >>> +static int ap_setup(void) >>> { >>> + int rc; >>> + >>> set_vcpu_id(); >>> - map_vcpuinfo(); >>> - init_evtchn(); >>> + >>> + rc = map_vcpuinfo(); >>> + if ( rc ) >>> + return rc; >>> + >>> + return init_evtchn(); >>> } >> >> To avoid a local variable, how about >> >> return map_vcpuinfo() ?: init_evtchn(); >> >> ? > > ISTR this is a GNU extension, but seeing that there is already quite a > lot of it in hypercisor code, I will make the change. In our own code using extensions is generally fine (as far as they're sufficiently backwards compatible). It's the public headers where we want to be more careful. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |