virt: acrn: Use vfs_poll() instead of f_op->poll()
PATCH 1/1 virt: acrn: Use vfs_poll() instead of f_op->poll()
In acrn_irqfd_assign(), use vfs_poll() is a more advanced function, as the same time, modify the definition of events.
--- drivers/virt/acrn/irqfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/virt/acrn/irqfd.c +2 -2
@@ -112,9 +112,9 @@ static int acrn_irqfd_assign(struct acrn_vm *vm, struct acrn_irqfd *args) {struct eventfd_ctx *eventfd =NULL ;struct hsm_irqfd *irqfd, *tmp; -unsigned int events;struct fd f;int ret =0 ; +__poll_t events; irqfd =kzalloc (sizeof (*irqfd),GFP_KERNEL );if (!irqfd)
@@ -158,7 +158,7 @@ static int acrn_irqfd_assign(struct acrn_vm *vm, struct acrn_irqfd *args)mutex_unlock (&vm->irqfds_lock);/* Check the pending event in this stage */ - events = f.file->f_op->poll (f.file, &irqfd->pt); + events =vfs_poll (f.file, &irqfd->pt);if (events &POLLIN )acrn_irqfd_inject (irqfd);
Signature · 1 line
2.29.0
Thanks for the patch.
Quoted 13 lines · Yejune Deng
In
acrn_irqfd_assign(), usevfs_poll()is a more advanced function, as the same time, modify the definition of events.Signed-off-by Yejune Deng <[email protected]>---
drivers/virt/acrn/irqfd.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)drivers/virt/acrn/irqfd.c +0
-0
drivers/virt/acrn/irqfd.c static int acrn_irqfd_assign(struct acrn_vm *vm, struct acrn_irqfd *args) · line 117
Quoted 7 lines
drivers/virt/acrn/irqfd.c +1
-1@@ -112,9 +112,9 @@ static int acrn_irqfd_assign(struct acrn_vm *vm, struct acrn_irqfd *args) {struct eventfd_ctx *eventfd =NULL ;struct hsm_irqfd *irqfd, *tmp; -unsigned int events;struct fd f;int ret =0 ; +__poll_t events;
Can you keep variable declarations is reverse fir tree order which this driver follows?
Quoted 15 lines
drivers/virt/acrn/irqfd.c +1
-1irqfd =kzalloc (sizeof (*irqfd),GFP_KERNEL );if (!irqfd)@@ -158,7 +158,7 @@ static int acrn_irqfd_assign(struct acrn_vm *vm, struct acrn_irqfd *args)mutex_unlock (&vm->irqfds_lock);/* Check the pending event in this stage */ - events = f.file->f_op->poll (f.file, &irqfd->pt); + events =vfs_poll (f.file, &irqfd->pt);if (events &POLLIN )acrn_irqfd_inject (irqfd);Signature · 1 line
2.29.0
OK,I will adopt it and resubmit.
Quoted 43 lines · Shuo A Liu
Thanks for the patch.
Quoted 13 lines · Yejune Deng
In
acrn_irqfd_assign(), usevfs_poll()is a more advanced function, as the same time, modify the definition of events.Signed-off-by Yejune Deng <[email protected]>---
drivers/virt/acrn/irqfd.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)drivers/virt/acrn/irqfd.c +0
-0drivers/virt/acrn/irqfd.c static int acrn_irqfd_assign(struct acrn_vm *vm, struct acrn_irqfd *args) · line 117
Quoted 7 lines
drivers/virt/acrn/irqfd.c +1
-1@@ -112,9 +112,9 @@ static int acrn_irqfd_assign(struct acrn_vm *vm, struct acrn_irqfd *args) {struct eventfd_ctx *eventfd =NULL ;struct hsm_irqfd *irqfd, *tmp; -unsigned int events;struct fd f;int ret =0 ; +__poll_t events;Can you keep variable declarations is reverse fir tree order which this driver follows?
Quoted 15 lines
drivers/virt/acrn/irqfd.c +1
-2irqfd =kzalloc (sizeof (*irqfd),GFP_KERNEL );if (!irqfd)@@ -158,7 +158,7 @@ static int acrn_irqfd_assign(struct acrn_vm *vm, struct acrn_irqfd *args)mutex_unlock (&vm->irqfds_lock);/* Check the pending event in this stage */ - events = f.file->f_op->poll (f.file, &irqfd->pt); + events =vfs_poll (f.file, &irqfd->pt);if (events &POLLIN )acrn_irqfd_inject (irqfd); --2.29.0