From: Tian Tao <tiantao6@hisilicon.com>
To: <maarten.lankhorst@linux.intel.com>, <mripard@kernel.org>,
<tzimmermann@suse.de>, <airlied@linux.ie>, <daniel@ffwll.ch>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] drm/irq: Modify the return value type of drm_irq_uninstall
Date: Mon, 2 Nov 2020 20:38:05 +0800 [thread overview]
Message-ID: <1604320685-14995-1-git-send-email-tiantao6@hisilicon.com> (raw)
There is no driver to use the return value of drm_irq_uninstal,
so modify the return value type of drm_irq_uninstal to void.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
drivers/gpu/drm/drm_irq.c | 13 ++++++-------
include/drm/drm_irq.h | 2 +-
2 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 7537a3d..45e6471 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -166,14 +166,14 @@ EXPORT_SYMBOL(drm_irq_install);
* Returns:
* Zero on success or a negative error code on failure.
*/
-int drm_irq_uninstall(struct drm_device *dev)
+void drm_irq_uninstall(struct drm_device *dev)
{
unsigned long irqflags;
bool irq_enabled;
int i;
if (!dev->irq_enabled || !dev)
- return 0;
+ return;
irq_enabled = dev->irq_enabled;
dev->irq_enabled = false;
@@ -200,8 +200,8 @@ int drm_irq_uninstall(struct drm_device *dev)
spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
}
- if (!irq_enabled)
- return -EINVAL;
+ if (!drm_WARN_ON(dev, !irq_enabled))
+ return;
DRM_DEBUG("irq=%d\n", dev->irq);
@@ -213,7 +213,6 @@ int drm_irq_uninstall(struct drm_device *dev)
free_irq(dev->irq, dev);
- return 0;
}
EXPORT_SYMBOL(drm_irq_uninstall);
@@ -250,10 +249,10 @@ int drm_legacy_irq_control(struct drm_device *dev, void *data,
return ret;
case DRM_UNINST_HANDLER:
mutex_lock(&dev->struct_mutex);
- ret = drm_irq_uninstall(dev);
+ drm_irq_uninstall(dev);
mutex_unlock(&dev->struct_mutex);
- return ret;
+ return 0;
default:
return -EINVAL;
}
diff --git a/include/drm/drm_irq.h b/include/drm/drm_irq.h
index d77f6e6..d9f6ec0 100644
--- a/include/drm/drm_irq.h
+++ b/include/drm/drm_irq.h
@@ -27,6 +27,6 @@
struct drm_device;
int drm_irq_install(struct drm_device *dev, int irq);
-int drm_irq_uninstall(struct drm_device *dev);
+void drm_irq_uninstall(struct drm_device *dev);
#endif
--
2.7.4
next reply other threads:[~2020-11-02 12:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-02 12:38 Tian Tao [this message]
2020-11-02 12:48 ` [PATCH] drm/irq: Modify the return value type of drm_irq_uninstall Thomas Zimmermann
2020-11-02 13:05 ` Daniel Vetter
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=1604320685-14995-1-git-send-email-tiantao6@hisilicon.com \
--to=tiantao6@hisilicon.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=tzimmermann@suse.de \
/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).