From: Dragan Cvetic <draganc@xilinx.com>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Derek Kiernan <dkiernan@xilinx.com>
Subject: RE: [PATCH] misc: xilinx_sdfec: fix xsdfec_poll()'s return type
Date: Thu, 21 Nov 2019 15:39:33 +0000 [thread overview]
Message-ID: <CH2PR02MB6359877D5963764F718FAAF4CB4E0@CH2PR02MB6359.namprd02.prod.outlook.com> (raw)
In-Reply-To: <20191120001030.30779-1-luc.vanoostenryck@gmail.com>
Hi Luc,
please find my comments below.
> -----Original Message-----
> From: Luc Van Oostenryck [mailto:luc.vanoostenryck@gmail.com]
> Sent: Wednesday 20 November 2019 00:11
> To: linux-kernel@vger.kernel.org
> Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>; Derek Kiernan <dkiernan@xilinx.com>; Dragan Cvetic
> <draganc@xilinx.com>
> Subject: [PATCH] misc: xilinx_sdfec: fix xsdfec_poll()'s return type
>
> xsdfec_poll() is defined as returning 'unsigned int' but the
> .poll method is declared as returning '__poll_t', a bitwise type.
>
> Fix this by using the proper return type and using the EPOLL
> constants instead of the POLL ones, as required for __poll_t.
>
> CC: Derek Kiernan <derek.kiernan@xilinx.com>
> CC: Dragan Cvetic <dragan.cvetic@xilinx.com>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
> ---
> drivers/misc/xilinx_sdfec.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c
> index 11835969e982..48ba7e02bed7 100644
> --- a/drivers/misc/xilinx_sdfec.c
> +++ b/drivers/misc/xilinx_sdfec.c
> @@ -1025,25 +1025,25 @@ static long xsdfec_dev_compat_ioctl(struct file *file, unsigned int cmd,
> }
> #endif
>
> -static unsigned int xsdfec_poll(struct file *file, poll_table *wait)
> +static __poll_t xsdfec_poll(struct file *file, poll_table *wait)
> {
> - unsigned int mask = 0;
> + __poll_t mask = 0;
> struct xsdfec_dev *xsdfec;
>
> xsdfec = container_of(file->private_data, struct xsdfec_dev, miscdev);
>
> if (!xsdfec)
> - return POLLNVAL | POLLHUP;
> + return EPOLLNVAL | EPOLLHUP;
>
> poll_wait(file, &xsdfec->waitq, wait);
>
> /* XSDFEC ISR detected an error */
> spin_lock_irqsave(&xsdfec->error_data_lock, xsdfec->flags);
> if (xsdfec->state_updated)
> - mask |= POLLIN | POLLPRI;
> + mask |= EPOLLIN | EPOLLPRI;
>
> if (xsdfec->stats_updated)
> - mask |= POLLIN | POLLRDNORM;
> + mask |= EPOLLIN | EPOLLRDNORM;
> spin_unlock_irqrestore(&xsdfec->error_data_lock, xsdfec->flags);
>
> return mask;
> --
> 2.24.0
Acked-by: Dragan Cvetic <dragan.cvetic@xilinx.com>
prev parent reply other threads:[~2019-11-21 15:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-20 0:10 [PATCH] misc: xilinx_sdfec: fix xsdfec_poll()'s return type Luc Van Oostenryck
2019-11-20 15:59 ` Dragan Cvetic
2019-11-20 18:02 ` Luc Van Oostenryck
2019-11-20 19:08 ` Dragan Cvetic
2019-11-21 15:39 ` Dragan Cvetic [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CH2PR02MB6359877D5963764F718FAAF4CB4E0@CH2PR02MB6359.namprd02.prod.outlook.com \
--to=draganc@xilinx.com \
--cc=dkiernan@xilinx.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luc.vanoostenryck@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).