linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peng Hao <peng.hao2@zte.com.cn>
To: pbonzini@redhat.com, rkrcmar@redhat.com
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Peng Hao <peng.hao2@zte.com.cn>
Subject: [PATCH]  kvm/eventfd : unnecessory conversion to bool
Date: Thu, 27 Dec 2018 14:22:17 +0800	[thread overview]
Message-ID: <1545891737-84095-1-git-send-email-peng.hao2@zte.com.cn> (raw)

Conversion to bool is not needed in ioeventfd_in_range.

Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
---
 virt/kvm/eventfd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index b20b751..d4cdc9c 100644
--- a/virt/kvm/eventfd.c
+++ b/virt/kvm/eventfd.c
@@ -723,7 +723,7 @@ struct _ioeventfd {
 		return false;
 	}
 
-	return _val == p->datamatch ? true : false;
+	return _val == p->datamatch;
 }
 
 /* MMIO/PIO writes trigger an event if the addr/val match */
-- 
1.8.3.1


             reply	other threads:[~2018-12-27  6:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-27  6:22 Peng Hao [this message]
2019-01-11 13:42 ` [PATCH] kvm/eventfd : unnecessory conversion to bool Radim Krčmář

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=1545891737-84095-1-git-send-email-peng.hao2@zte.com.cn \
    --to=peng.hao2@zte.com.cn \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).