From: Corey Minyard <minyard@acm.org>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: linux-kernel@vger.kernel.org,
openipmi-developer@lists.sourceforge.net,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Asmaa Mnebhi <Asmaa@mellanox.com>
Subject: Re: [PATCH] ipmi: fix ipmb_poll()'s return type
Date: Fri, 22 Nov 2019 13:40:41 -0600 [thread overview]
Message-ID: <20191122194041.GB3527@minyard.net> (raw)
In-Reply-To: <20191120000741.30657-1-luc.vanoostenryck@gmail.com>
On Wed, Nov 20, 2019 at 01:07:41AM +0100, Luc Van Oostenryck wrote:
> ipmb_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.
Copying the author for comment, but this looks ok with me.
-corey
>
> CC: Corey Minyard <minyard@acm.org>
> CC: openipmi-developer@lists.sourceforge.net
> CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
> ---
> drivers/char/ipmi/ipmb_dev_int.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/char/ipmi/ipmb_dev_int.c b/drivers/char/ipmi/ipmb_dev_int.c
> index 285e0b8f9a97..2ea51147c3e8 100644
> --- a/drivers/char/ipmi/ipmb_dev_int.c
> +++ b/drivers/char/ipmi/ipmb_dev_int.c
> @@ -154,16 +154,16 @@ static ssize_t ipmb_write(struct file *file, const char __user *buf,
> return ret ? : count;
> }
>
> -static unsigned int ipmb_poll(struct file *file, poll_table *wait)
> +static __poll_t ipmb_poll(struct file *file, poll_table *wait)
> {
> struct ipmb_dev *ipmb_dev = to_ipmb_dev(file);
> - unsigned int mask = POLLOUT;
> + __poll_t mask = EPOLLOUT;
>
> mutex_lock(&ipmb_dev->file_mutex);
> poll_wait(file, &ipmb_dev->wait_queue, wait);
>
> if (atomic_read(&ipmb_dev->request_queue_len))
> - mask |= POLLIN;
> + mask |= EPOLLIN;
> mutex_unlock(&ipmb_dev->file_mutex);
>
> return mask;
> --
> 2.24.0
>
next prev parent reply other threads:[~2019-11-22 19:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-20 0:07 [PATCH] ipmi: fix ipmb_poll()'s return type Luc Van Oostenryck
2019-11-22 19:40 ` Corey Minyard [this message]
2019-11-22 19:43 ` Asmaa Mnebhi
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=20191122194041.GB3527@minyard.net \
--to=minyard@acm.org \
--cc=Asmaa@mellanox.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luc.vanoostenryck@gmail.com \
--cc=openipmi-developer@lists.sourceforge.net \
/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 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.