summaryrefslogtreecommitdiffstats
path: root/virt/kvm
diff options
context:
space:
mode:
authorJason Yan <yanaijie@huawei.com>2020-04-20 20:38:05 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2020-05-13 12:14:58 -0400
commitc4e115f08c08cb9f3b70247b42323e40b9afd1fd (patch)
tree0dec87560798eeaaa04a4b477db1d9cddd2583b5 /virt/kvm
parentda4ad88cab5867ee240dfd0585e9d115a8cc47db (diff)
downloadlinux-c4e115f08c08cb9f3b70247b42323e40b9afd1fd.tar.bz2
kvm/eventfd: remove unneeded conversion to bool
The '==' expression itself is bool, no need to convert it to bool again. This fixes the following coccicheck warning: virt/kvm/eventfd.c:724:38-43: WARNING: conversion to bool not needed here Signed-off-by: Jason Yan <yanaijie@huawei.com> Message-Id: <20200420123805.4494-1-yanaijie@huawei.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt/kvm')
-rw-r--r--virt/kvm/eventfd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c
index 67b6fc153e9c..0c4ede45e6bd 100644
--- a/virt/kvm/eventfd.c
+++ b/virt/kvm/eventfd.c
@@ -721,7 +721,7 @@ ioeventfd_in_range(struct _ioeventfd *p, gpa_t addr, int len, const void *val)
return false;
}
- return _val == p->datamatch ? true : false;
+ return _val == p->datamatch;
}
/* MMIO/PIO writes trigger an event if the addr/val match */