From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> To: linux-kernel@vger.kernel.org Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Sean Paul <sean@poorly.run>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>, dri-devel@lists.freedesktop.org Subject: [PATCH] drm/crc-debugfs: fix crtc_crc_poll()'s return type Date: Wed, 20 Nov 2019 01:07:54 +0100 [thread overview] Message-ID: <20191120000754.30710-1-luc.vanoostenryck@gmail.com> (raw) crtc_crc_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: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> CC: Maxime Ripard <mripard@kernel.org> CC: Sean Paul <sean@poorly.run> CC: David Airlie <airlied@linux.ie> CC: Daniel Vetter <daniel@ffwll.ch> CC: dri-devel@lists.freedesktop.org Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> --- drivers/gpu/drm/drm_debugfs_crc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_debugfs_crc.c b/drivers/gpu/drm/drm_debugfs_crc.c index be1b7ba92ffe..0bb0aa0ebbca 100644 --- a/drivers/gpu/drm/drm_debugfs_crc.c +++ b/drivers/gpu/drm/drm_debugfs_crc.c @@ -334,17 +334,17 @@ static ssize_t crtc_crc_read(struct file *filep, char __user *user_buf, return LINE_LEN(crc->values_cnt); } -static unsigned int crtc_crc_poll(struct file *file, poll_table *wait) +static __poll_t crtc_crc_poll(struct file *file, poll_table *wait) { struct drm_crtc *crtc = file->f_inode->i_private; struct drm_crtc_crc *crc = &crtc->crc; - unsigned ret; + __poll_t ret; poll_wait(file, &crc->wq, wait); spin_lock_irq(&crc->lock); if (crc->source && crtc_crc_data_count(crc)) - ret = POLLIN | POLLRDNORM; + ret = EPOLLIN | EPOLLRDNORM; else ret = 0; spin_unlock_irq(&crc->lock); -- 2.24.0
WARNING: multiple messages have this Message-ID (diff)
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> To: linux-kernel@vger.kernel.org Cc: David Airlie <airlied@linux.ie>, dri-devel@lists.freedesktop.org, Sean Paul <sean@poorly.run>, Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Subject: [PATCH] drm/crc-debugfs: fix crtc_crc_poll()'s return type Date: Wed, 20 Nov 2019 01:07:54 +0100 [thread overview] Message-ID: <20191120000754.30710-1-luc.vanoostenryck@gmail.com> (raw) Message-ID: <20191120000754.E3hCQ54LD_b9mIyOFAaBIQdQYaGK1BeHNjRQCbNPNEQ@z> (raw) crtc_crc_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: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> CC: Maxime Ripard <mripard@kernel.org> CC: Sean Paul <sean@poorly.run> CC: David Airlie <airlied@linux.ie> CC: Daniel Vetter <daniel@ffwll.ch> CC: dri-devel@lists.freedesktop.org Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> --- drivers/gpu/drm/drm_debugfs_crc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_debugfs_crc.c b/drivers/gpu/drm/drm_debugfs_crc.c index be1b7ba92ffe..0bb0aa0ebbca 100644 --- a/drivers/gpu/drm/drm_debugfs_crc.c +++ b/drivers/gpu/drm/drm_debugfs_crc.c @@ -334,17 +334,17 @@ static ssize_t crtc_crc_read(struct file *filep, char __user *user_buf, return LINE_LEN(crc->values_cnt); } -static unsigned int crtc_crc_poll(struct file *file, poll_table *wait) +static __poll_t crtc_crc_poll(struct file *file, poll_table *wait) { struct drm_crtc *crtc = file->f_inode->i_private; struct drm_crtc_crc *crc = &crtc->crc; - unsigned ret; + __poll_t ret; poll_wait(file, &crc->wq, wait); spin_lock_irq(&crc->lock); if (crc->source && crtc_crc_data_count(crc)) - ret = POLLIN | POLLRDNORM; + ret = EPOLLIN | EPOLLRDNORM; else ret = 0; spin_unlock_irq(&crc->lock); -- 2.24.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2019-11-20 0:10 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-11-20 0:07 Luc Van Oostenryck [this message] 2019-11-20 0:07 ` [PATCH] drm/crc-debugfs: fix crtc_crc_poll()'s return type Luc Van Oostenryck 2019-11-20 10:21 ` Ville Syrjälä 2019-11-20 10:21 ` Ville Syrjälä
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=20191120000754.30710-1-luc.vanoostenryck@gmail.com \ --to=luc.vanoostenryck@gmail.com \ --cc=airlied@linux.ie \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-kernel@vger.kernel.org \ --cc=maarten.lankhorst@linux.intel.com \ --cc=mripard@kernel.org \ --cc=sean@poorly.run \ /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: linkBe 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.