Commit cecb46f194460d23cacf3b13593f9f5a4f7a0fed
1 parent
e10ce27f0d
Exists in
master
and in
20 other branches
vhost_set_vring(): turn pollstart/pollstop into bool
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 1 changed file with 4 additions and 4 deletions Side-by-side Diff
drivers/vhost/vhost.c
... | ... | @@ -636,8 +636,8 @@ |
636 | 636 | |
637 | 637 | static long vhost_set_vring(struct vhost_dev *d, int ioctl, void __user *argp) |
638 | 638 | { |
639 | - struct file *eventfp, *filep = NULL, | |
640 | - *pollstart = NULL, *pollstop = NULL; | |
639 | + struct file *eventfp, *filep = NULL; | |
640 | + bool pollstart = false, pollstop = false; | |
641 | 641 | struct eventfd_ctx *ctx = NULL; |
642 | 642 | u32 __user *idxp = argp; |
643 | 643 | struct vhost_virtqueue *vq; |
... | ... | @@ -763,8 +763,8 @@ |
763 | 763 | break; |
764 | 764 | } |
765 | 765 | if (eventfp != vq->kick) { |
766 | - pollstop = filep = vq->kick; | |
767 | - pollstart = vq->kick = eventfp; | |
766 | + pollstop = (filep = vq->kick) != NULL; | |
767 | + pollstart = (vq->kick = eventfp) != NULL; | |
768 | 768 | } else |
769 | 769 | filep = eventfp; |
770 | 770 | break; |