kvm/eventfd: remove unneeded conversion to bool
PATCH 1/1 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
--- virt/kvm/eventfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
virt/kvm/eventfd.c +1 -1
@@ -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 */
Signature · 1 line
2.21.1
Quoted 7 lines · Jason Yan
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 <[email protected]>
Signature · 1 line
Peter Xu
Quoted 17 lines · Jason Yan
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 <[email protected]>--- virt/kvm/eventfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)virt/kvm/eventfd.c +0
-0
virt/kvm/eventfd.c ioeventfd_in_range(struct _ioeventfd *p, gpa_t addr, int len, const void *val) · line 727
Quoted 8 lines
virt/kvm/eventfd.c +1
-1@@ -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 */
Queued, thanks.
Paolo
Quoted 17 lines · Jason Yan
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 <[email protected]>--- virt/kvm/eventfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)virt/kvm/eventfd.c +0
-0
virt/kvm/eventfd.c ioeventfd_in_range(struct _ioeventfd *p, gpa_t addr, int len, const void *val) · line 727
Quoted 8 lines
virt/kvm/eventfd.c +1
-1@@ -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 */
Queued, thanks.
Paolo