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

Re: [Xen-devel] [PATCH v3 08/13] x86/hvm: Setup TSC scaling ratio



On 01/08/16 07:04, Jan Beulich wrote:
> >>> On 08.01.16 at 14:55, <haozhong.zhang@xxxxxxxxx> wrote:
> > On 01/08/16 02:44, Jan Beulich wrote:
> >> >>> On 31.12.15 at 04:03, <haozhong.zhang@xxxxxxxxx> wrote:
> >> > +    ratio = mul_u64_u32_div(1ULL << 
> >> > hvm_funcs.tsc_scaling_ratio_frac_bits,
> >> > +                            gtsc_khz, cpu_khz);
> >> > +
> >> > +    return (!ratio || ratio > hvm_funcs.max_tsc_scaling_ratio) ? FALSE 
> >> > : TRUE;
> >>
> >> There no point in using a conditional expression here.
> > 
> > Ah, right, I'll  change it to
> >          return !!(ratio && ratio <= hvm_funcs.max_tsc_scaling_ratio);
> 
> Except that you don't need the !!() here either.
> 
> Jan
> 

Ah, yes.

Thanks,
Haozhong

_______________________________________________
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®.