From mboxrd@z Thu Jan 1 00:00:00 1970 From: Haozhong Zhang Subject: Re: [PATCH v3 08/13] x86/hvm: Setup TSC scaling ratio Date: Fri, 8 Jan 2016 22:10:15 +0800 Message-ID: <20160108141015.GH16393@hz-desktop.sh.intel.com> References: <1451531020-29964-1-git-send-email-haozhong.zhang@intel.com> <1451531020-29964-9-git-send-email-haozhong.zhang@intel.com> <568F932902000078000C4C26@prv-mh.provo.novell.com> <20160108135542.GF16393@hz-desktop.sh.intel.com> <568FCFFA02000078000C4E8C@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <568FCFFA02000078000C4E8C@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Kevin Tian , Keir Fraser , Suravee Suthikulpanit , Andrew Cooper , xen-devel@lists.xen.org, Aravind Gopalakrishnan , Jun Nakajima , Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org On 01/08/16 07:04, Jan Beulich wrote: > >>> On 08.01.16 at 14:55, wrote: > > On 01/08/16 02:44, Jan Beulich wrote: > >> >>> On 31.12.15 at 04:03, 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