* [PATCH v3] staging: fieldbus: core: fix ->poll() annotation
@ 2019-05-21 14:20 Sven Van Asbroeck
2019-05-21 14:24 ` Sven Van Asbroeck
2019-05-21 14:37 ` Dan Carpenter
0 siblings, 2 replies; 4+ messages in thread
From: Sven Van Asbroeck @ 2019-05-21 14:20 UTC (permalink / raw)
To: Oscar Gomez Fuente; +Cc: Greg KH, devel, Linux Kernel Mailing List
From: Oscar Gomez Fuente <oscargomezf@gmail.com>
->poll() functions should return __poll_t, but the fieldbus
core's poll() does not. This generates a sparse warning.
Fix the ->poll() return value, and use recommended __poll_t
constants (EPOLLxxx).
Signed-off-by: Oscar Gomez Fuente <oscargomezf@gmail.com>
---
drivers/staging/fieldbus/dev_core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/fieldbus/dev_core.c b/drivers/staging/fieldbus/dev_core.c
index 60b85140675a..f6f5b92ba914 100644
--- a/drivers/staging/fieldbus/dev_core.c
+++ b/drivers/staging/fieldbus/dev_core.c
@@ -211,16 +211,16 @@ static ssize_t fieldbus_write(struct file *filp, const char __user *buf,
return fbdev->write_area(fbdev, buf, size, offset);
}
-static unsigned int fieldbus_poll(struct file *filp, poll_table *wait)
+static __poll_t fieldbus_poll(struct file *filp, poll_table *wait)
{
struct fb_open_file *of = filp->private_data;
struct fieldbus_dev *fbdev = of->fbdev;
- unsigned int mask = POLLIN | POLLRDNORM | POLLOUT | POLLWRNORM;
+ __poll_t mask = EPOLLIN | EPOLLRDNORM | EPOLLOUT | EPOLLWRNORM;
poll_wait(filp, &fbdev->dc_wq, wait);
/* data changed ? */
if (fbdev->dc_event != of->dc_event)
- mask |= POLLPRI | POLLERR;
+ mask |= EPOLLPRI | EPOLLERR;
return mask;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3] staging: fieldbus: core: fix ->poll() annotation
2019-05-21 14:20 [PATCH v3] staging: fieldbus: core: fix ->poll() annotation Sven Van Asbroeck
@ 2019-05-21 14:24 ` Sven Van Asbroeck
2019-05-21 14:37 ` Dan Carpenter
1 sibling, 0 replies; 4+ messages in thread
From: Sven Van Asbroeck @ 2019-05-21 14:24 UTC (permalink / raw)
To: Oscar Gomez Fuente; +Cc: Greg KH, devel, Linux Kernel Mailing List
On Tue, May 21, 2019 at 10:20 AM Sven Van Asbroeck <thesven73@gmail.com> wrote:
>
> From: Oscar Gomez Fuente <oscargomezf@gmail.com>
>
> ->poll() functions should return __poll_t, but the fieldbus
> core's poll() does not. This generates a sparse warning.
>
> Fix the ->poll() return value, and use recommended __poll_t
> constants (EPOLLxxx).
>
> Signed-off-by: Oscar Gomez Fuente <oscargomezf@gmail.com>
Please ignore this patch.
> /dev/null :)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] staging: fieldbus: core: fix ->poll() annotation
2019-05-21 14:20 [PATCH v3] staging: fieldbus: core: fix ->poll() annotation Sven Van Asbroeck
2019-05-21 14:24 ` Sven Van Asbroeck
@ 2019-05-21 14:37 ` Dan Carpenter
2019-05-21 14:44 ` Sven Van Asbroeck
1 sibling, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2019-05-21 14:37 UTC (permalink / raw)
To: Sven Van Asbroeck
Cc: Oscar Gomez Fuente, devel, Greg KH, Linux Kernel Mailing List
On Tue, May 21, 2019 at 10:20:09AM -0400, Sven Van Asbroeck wrote:
> From: Oscar Gomez Fuente <oscargomezf@gmail.com>
>
> ->poll() functions should return __poll_t, but the fieldbus
> core's poll() does not. This generates a sparse warning.
>
> Fix the ->poll() return value, and use recommended __poll_t
> constants (EPOLLxxx).
>
> Signed-off-by: Oscar Gomez Fuente <oscargomezf@gmail.com>
> ---
If you're resending someone's patch, you have to add your own Signed off
by line as well. Everyone who touches a patch has to sign that they
didn't add any of SCO's all powerful UnixWare source code into the
patch.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] staging: fieldbus: core: fix ->poll() annotation
2019-05-21 14:37 ` Dan Carpenter
@ 2019-05-21 14:44 ` Sven Van Asbroeck
0 siblings, 0 replies; 4+ messages in thread
From: Sven Van Asbroeck @ 2019-05-21 14:44 UTC (permalink / raw)
To: Dan Carpenter
Cc: Oscar Gomez Fuente, devel, Greg KH, Linux Kernel Mailing List
On Tue, May 21, 2019 at 10:37 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
>
> If you're resending someone's patch, you have to add your own Signed off
> by line as well. Everyone who touches a patch has to sign that they
> didn't add any of SCO's all powerful UnixWare source code into the
> patch.
>
Thank you Dan, that's very useful to know !
Sven
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-05-21 14:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-21 14:20 [PATCH v3] staging: fieldbus: core: fix ->poll() annotation Sven Van Asbroeck
2019-05-21 14:24 ` Sven Van Asbroeck
2019-05-21 14:37 ` Dan Carpenter
2019-05-21 14:44 ` Sven Van Asbroeck
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.