Skip to content

Commit

Permalink
kvm/eventfd: remove unneeded conversion to bool
Browse files Browse the repository at this point in the history
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]>
Message-Id: <[email protected]>
Reviewed-by: Peter Xu <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
JasonYanHw authored and bonzini committed May 13, 2020
1 parent da4ad88 commit c4e115f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virt/kvm/eventfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit c4e115f

Please sign in to comment.