All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] virt: acrn: Use vfs_poll() instead of f_op->poll()
@ 2021-02-19  9:26 Yejune Deng
  2021-02-20  9:48 ` Shuo A Liu
  0 siblings, 1 reply; 7+ messages in thread
From: Yejune Deng @ 2021-02-19  9:26 UTC (permalink / raw)
  To: shuo.a.liu; +Cc: linux-kernel, Yejune Deng

In acrn_irqfd_assign(), use vfs_poll() is a more advanced function,
as the same time, modify the definition of events.

Signed-off-by: Yejune Deng <yejune.deng@gmail.com>
---
 drivers/virt/acrn/irqfd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/virt/acrn/irqfd.c b/drivers/virt/acrn/irqfd.c
index a8766d528e29..19890396e174 100644
--- a/drivers/virt/acrn/irqfd.c
+++ b/drivers/virt/acrn/irqfd.c
@@ -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);
-- 
2.29.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] virt: acrn: Use vfs_poll() instead of f_op->poll()
  2021-02-19  9:26 [PATCH] virt: acrn: Use vfs_poll() instead of f_op->poll() Yejune Deng
@ 2021-02-20  9:48 ` Shuo A Liu
  2021-02-20 11:00   ` Yejune Deng
  0 siblings, 1 reply; 7+ messages in thread
From: Shuo A Liu @ 2021-02-20  9:48 UTC (permalink / raw)
  To: Yejune Deng; +Cc: linux-kernel

Thanks for the patch.

On Fri 19.Feb'21 at 17:26:12 +0800, Yejune Deng wrote:
>In acrn_irqfd_assign(), use vfs_poll() is a more advanced function,
>as the same time, modify the definition of events.
>
>Signed-off-by: Yejune Deng <yejune.deng@gmail.com>
>---
> drivers/virt/acrn/irqfd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/virt/acrn/irqfd.c b/drivers/virt/acrn/irqfd.c
>index a8766d528e29..19890396e174 100644
>--- a/drivers/virt/acrn/irqfd.c
>+++ b/drivers/virt/acrn/irqfd.c
>@@ -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?

>
> 	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);
>-- 
>2.29.0
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] virt: acrn: Use vfs_poll() instead of f_op->poll()
  2021-02-20  9:48 ` Shuo A Liu
@ 2021-02-20 11:00   ` Yejune Deng
  0 siblings, 0 replies; 7+ messages in thread
From: Yejune Deng @ 2021-02-20 11:00 UTC (permalink / raw)
  To: Shuo A Liu; +Cc: Linux Kernel Mailing List

OK,I will adopt it and resubmit.


On Sat, Feb 20, 2021 at 5:48 PM Shuo A Liu <shuo.a.liu@intel.com> wrote:
>
> Thanks for the patch.
>
> On Fri 19.Feb'21 at 17:26:12 +0800, Yejune Deng wrote:
> >In acrn_irqfd_assign(), use vfs_poll() is a more advanced function,
> >as the same time, modify the definition of events.
> >
> >Signed-off-by: Yejune Deng <yejune.deng@gmail.com>
> >---
> > drivers/virt/acrn/irqfd.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> >diff --git a/drivers/virt/acrn/irqfd.c b/drivers/virt/acrn/irqfd.c
> >index a8766d528e29..19890396e174 100644
> >--- a/drivers/virt/acrn/irqfd.c
> >+++ b/drivers/virt/acrn/irqfd.c
> >@@ -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?
>
> >
> >       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);
> >--
> >2.29.0
> >

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] virt: acrn: Use vfs_poll() instead of f_op->poll()
  2021-02-21  7:54   ` Greg Kroah-Hartman
@ 2021-02-21 13:11     ` Shuo A Liu
  0 siblings, 0 replies; 7+ messages in thread
From: Shuo A Liu @ 2021-02-21 13:11 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Yejune Deng, linux-kernel

On Sun 21.Feb'21 at  8:54:06 +0100, Greg Kroah-Hartman wrote:
>On Sun, Feb 21, 2021 at 09:50:42AM +0800, Liu, Shuo A wrote:
>>
>>
>> On 2/20/2021 22:53, Yejune Deng wrote:
>> > Use vfs_poll() is a more advanced function in acrn_irqfd_assign().
>> > as the same time, modify the definition of events.
>> >
>> > Signed-off-by: Yejune Deng <yejune.deng@gmail.com>
>>
>> Thanks for the update.
>> Reviewed-by: Shuo Liu <shuo.a.liu@intel.com>
>>
>> Hi Greg,
>> Need i do more work on this patch?
>> Or you will review and apply on your tree directly?
>
>Please resend it to me with your signed-off-by on it.

OK.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] virt: acrn: Use vfs_poll() instead of f_op->poll()
  2021-02-21  1:50 ` Liu, Shuo A
@ 2021-02-21  7:54   ` Greg Kroah-Hartman
  2021-02-21 13:11     ` Shuo A Liu
  0 siblings, 1 reply; 7+ messages in thread
From: Greg Kroah-Hartman @ 2021-02-21  7:54 UTC (permalink / raw)
  To: Liu, Shuo A; +Cc: Yejune Deng, linux-kernel

On Sun, Feb 21, 2021 at 09:50:42AM +0800, Liu, Shuo A wrote:
> 
> 
> On 2/20/2021 22:53, Yejune Deng wrote:
> > Use vfs_poll() is a more advanced function in acrn_irqfd_assign().
> > as the same time, modify the definition of events.
> > 
> > Signed-off-by: Yejune Deng <yejune.deng@gmail.com>
> 
> Thanks for the update.
> Reviewed-by: Shuo Liu <shuo.a.liu@intel.com>
> 
> Hi Greg,
> Need i do more work on this patch?
> Or you will review and apply on your tree directly?

Please resend it to me with your signed-off-by on it.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] virt: acrn: Use vfs_poll() instead of f_op->poll()
  2021-02-20 14:53 Yejune Deng
@ 2021-02-21  1:50 ` Liu, Shuo A
  2021-02-21  7:54   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 7+ messages in thread
From: Liu, Shuo A @ 2021-02-21  1:50 UTC (permalink / raw)
  To: Yejune Deng; +Cc: linux-kernel, Greg Kroah-Hartman



On 2/20/2021 22:53, Yejune Deng wrote:
> Use vfs_poll() is a more advanced function in acrn_irqfd_assign().
> as the same time, modify the definition of events.
> 
> Signed-off-by: Yejune Deng <yejune.deng@gmail.com>

Thanks for the update.
Reviewed-by: Shuo Liu <shuo.a.liu@intel.com>

Hi Greg,
Need i do more work on this patch?
Or you will review and apply on your tree directly?

Thanks
shuo

> ---
>  drivers/virt/acrn/irqfd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/virt/acrn/irqfd.c b/drivers/virt/acrn/irqfd.c
> index a8766d528e29..98d6e9b18f9e 100644
> --- a/drivers/virt/acrn/irqfd.c
> +++ b/drivers/virt/acrn/irqfd.c
> @@ -112,7 +112,7 @@ 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;
> +	__poll_t events;
>  	struct fd f;
>  	int ret = 0;
>  
> @@ -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);
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] virt: acrn: Use vfs_poll() instead of f_op->poll()
@ 2021-02-20 14:53 Yejune Deng
  2021-02-21  1:50 ` Liu, Shuo A
  0 siblings, 1 reply; 7+ messages in thread
From: Yejune Deng @ 2021-02-20 14:53 UTC (permalink / raw)
  To: shuo.a.liu; +Cc: linux-kernel, yejune.deng

Use vfs_poll() is a more advanced function in acrn_irqfd_assign().
as the same time, modify the definition of events.

Signed-off-by: Yejune Deng <yejune.deng@gmail.com>
---
 drivers/virt/acrn/irqfd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/virt/acrn/irqfd.c b/drivers/virt/acrn/irqfd.c
index a8766d528e29..98d6e9b18f9e 100644
--- a/drivers/virt/acrn/irqfd.c
+++ b/drivers/virt/acrn/irqfd.c
@@ -112,7 +112,7 @@ 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;
+	__poll_t events;
 	struct fd f;
 	int ret = 0;
 
@@ -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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-02-21 13:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-19  9:26 [PATCH] virt: acrn: Use vfs_poll() instead of f_op->poll() Yejune Deng
2021-02-20  9:48 ` Shuo A Liu
2021-02-20 11:00   ` Yejune Deng
2021-02-20 14:53 Yejune Deng
2021-02-21  1:50 ` Liu, Shuo A
2021-02-21  7:54   ` Greg Kroah-Hartman
2021-02-21 13:11     ` Shuo A Liu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.