[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/vmx: fix vmx_is_singlestep_supported return value
> From: Jan Beulich [mailto:jbeulich@xxxxxxxx] > Sent: Tuesday, August 25, 2015 3:59 PM > > >>> Tamas K Lengyel <tamas.lengyel@xxxxxxxxxxxx> 08/25/15 1:51 AM >>> > >>> @@ -1768,7 +1768,7 @@ static void vmx_enable_msr_exit_interception(struct > domain *d) > >>> > >>> static bool_t vmx_is_singlestep_supported(void) > >>> { > >>> - return cpu_has_monitor_trap_flag; > >>> + return cpu_has_monitor_trap_flag ? 1 : 0; > >> > >> Prevailing style would tend towards !!cpu_has_monitor_trap_flag > > > >Yeap, you are right. If the maintainers prefer I can resend with that style. > > This could easily be adjusted upon commit. What I'm wondering is whether this > is the right place to fix it: Wouldn't it be better for the cpu_has_* macros > themselves to be adjusted so other (future) users won't fall into the same > trap > (vmx_virtual_intr_delivery_enabled() is a good second example bogusly using > int as its return type, and once adjusted to bool_t it would break)? > I'm OK with original patch. Above example can be taken care when changing return type. Thanks Kevin _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |