mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roman Kagan <rkagan@virtuozzo.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Sasha Levin <sashal@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
	Michael Kelley <mikelley@microsoft.com>
Subject: Re: [PATCH] x86/hyper-v: micro-optimize send_ipi_one case
Date: Fri, 25 Oct 2019 09:41:28 +0000	[thread overview]
Message-ID: <20191025094125.GA23240@rkaganb.sw.ru> (raw)
In-Reply-To: <alpine.DEB.2.21.1910250036090.1783@nanos.tec.linutronix.de>

On Fri, Oct 25, 2019 at 12:38:05AM +0200, Thomas Gleixner wrote:
> 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 :)

Sure.  Time to vacuum my keyboard ;)

Thanks,
Roman.

  reply	other threads:[~2019-10-25  9:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24 15:21 Vitaly Kuznetsov
2019-10-24 16:32 ` Roman Kagan
2019-10-24 22:38   ` Thomas Gleixner
2019-10-25  9:41     ` Roman Kagan [this message]
2019-10-25 10:44   ` Vitaly Kuznetsov
2019-10-25 16:23     ` Michael Kelley
2019-10-24 16:47 ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191025094125.GA23240@rkaganb.sw.ru \
    --to=rkagan@virtuozzo.com \
    --cc=bp@alien8.de \
    --cc=haiyangz@microsoft.com \
    --cc=hpa@zytor.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikelley@microsoft.com \
    --cc=mingo@redhat.com \
    --cc=sashal@kernel.org \
    --cc=sthemmin@microsoft.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®