From: Felix Kuehling <Felix.Kuehling@amd.com>
To: amd-gfx@lists.freedesktop.org, amber.lin@amd.com
Cc: kernel test robot <lkp@intel.com>
Subject: [PATCH 1/1] drm/amdkfd: sparse: fix incorrect type in assignment
Date: Fri, 26 Jun 2020 19:39:51 -0400 [thread overview]
Message-ID: <20200626233951.11724-1-Felix.Kuehling@amd.com> (raw)
The correct way to implement the fops->poll callback uses EPOLL* macros.
For reference see also:
commit a9a08845e9ac ("vfs: do bulk POLL* -> EPOLL* replacement")
commit 7a163b2195cd ("unify {de,}mangle_poll(), get rid of kernel-side POLL...")
Reported-by: kernel test robot <lkp@intel.com>
Fixes: 73b753a11ae9 ("drm/amdkfd: Provide SMI events watch")
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
index f3782627407f..7b348bf9df21 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
@@ -59,13 +59,14 @@ static const struct file_operations kfd_smi_ev_fops = {
static __poll_t kfd_smi_ev_poll(struct file *filep,
struct poll_table_struct *wait)
{
- __poll_t mask;
struct kfd_smi_client *client = filep->private_data;
+ __poll_t mask = 0;
poll_wait(filep, &client->wait_queue, wait);
spin_lock(&client->lock);
- mask = kfifo_is_empty(&client->fifo) ? 0 : POLLIN | POLLRDNORM;
+ if (!kfifo_is_empty(&client->fifo))
+ mask = EPOLLIN | EPOLLRDNORM;
spin_unlock(&client->lock);
return mask;
--
2.27.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next reply other threads:[~2020-06-26 23:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-26 23:39 Felix Kuehling [this message]
2020-07-06 17:45 ` [PATCH 1/1] drm/amdkfd: sparse: fix incorrect type in assignment Felix Kuehling
2020-07-14 17:54 ` philip yang
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=20200626233951.11724-1-Felix.Kuehling@amd.com \
--to=felix.kuehling@amd.com \
--cc=amber.lin@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=lkp@intel.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).