From: Paolo Bonzini <pbonzini@redhat.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] kvm: x86: hyperv: delete dead code in kvm_hv_hypercall()
Date: Mon, 19 Mar 2018 16:01:27 +0000 [thread overview]
Message-ID: <a75c0f83-e49e-cfdb-6328-b1d2f1fd284e@redhat.com> (raw)
In-Reply-To: <20180317114827.GA4035@mwanda>
On 17/03/2018 16:11, Liran Alon wrote:
>
>> "rep_done" is always zero so the "(((u64)rep_done & 0xfff) << 32)"
>> expression is just zero. We can remove the "res" temporary variable
>> as
>> well and just use "ret" directly.
>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>>
> I think this commit should better be dropped than applied.
> The original code makes sense.
> It will make it easier to implement an hyper-v rep hypercall (which require rep_done).
> I don't think it makes current code much more complicated than it is without it.
If we really want to be ready for rep hypercalls, it would be better to
have a macro
#define HVCALL_MAKE_RESULT(retcode, rep_done)
and call it with a constant 0 as the second argument. A variable that
is never written except in the initializer is only adding noise.
Paolo
next prev parent reply other threads:[~2018-03-19 16:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-17 11:48 [PATCH] kvm: x86: hyperv: delete dead code in kvm_hv_hypercall() Dan Carpenter
2018-03-17 15:11 ` Liran Alon
2018-03-18 3:18 ` Dan Carpenter
2018-03-19 16:01 ` Paolo Bonzini [this message]
2018-03-23 19:12 ` Paolo Bonzini
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=a75c0f83-e49e-cfdb-6328-b1d2f1fd284e@redhat.com \
--to=pbonzini@redhat.com \
--cc=kernel-janitors@vger.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