lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1910250036090.1783@nanos.tec.linutronix.de>
Date:   Fri, 25 Oct 2019 00:38:05 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Roman Kagan <rkagan@...tuozzo.com>
cc:     Vitaly Kuznetsov <vkuznets@...hat.com>,
        "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "K. Y. Srinivasan" <kys@...rosoft.com>,
        Haiyang Zhang <haiyangz@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        Sasha Levin <sashal@...nel.org>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "H. Peter Anvin" <hpa@...or.com>,
        Michael Kelley <mikelley@...rosoft.com>
Subject: Re: [PATCH] x86/hyper-v: micro-optimize send_ipi_one case

On Thu, 24 Oct 2019, Roman Kagan wrote:
> > +
> > +	if (cpu >= 64)
> > +		goto do_ex_hypercall;
> > +
> > +	ret = hv_do_fast_hypercall16(HVCALL_SEND_IPI, vector,
> > +				     BIT_ULL(hv_cpu_number_to_vp_number(cpu)));
> > +	return ((ret == 0) ? true : false);
> 
> D'oh.  Isn't "return ret == 0;" or just "return ret;" good enough?

   'return ret == 0' != 'return ret'

!ret perhaps :)

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ