From: Thomas Zimmermann <tzimmermann@suse.de>
To: Tian Tao <tiantao6@hisilicon.com>,
airlied@linux.ie, daniel@ffwll.ch, kraxel@redhat.com,
alexander.deucher@amd.com, tglx@linutronix.de,
dri-devel@lists.freedesktop.org, xinliang.liu@linaro.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/hisilicon: Remove redundant null check
Date: Mon, 2 Nov 2020 09:32:03 +0100 [thread overview]
Message-ID: <2dbbbad0-53cf-52cc-3b6b-0d1547f7e085@suse.de> (raw)
In-Reply-To: <1604050046-64539-1-git-send-email-tiantao6@hisilicon.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 1456 bytes --]
Hi
Am 30.10.20 um 10:27 schrieb Tian Tao:
> drm_irq_uninstall can handle the case where dev->irq_enable is false,
> so Remove redundant null check.
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> ---
> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> index 0c1b40d..b71589b1 100644
> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
> @@ -246,13 +246,13 @@ static int hibmc_unload(struct drm_device *dev)
>
> drm_atomic_helper_shutdown(dev);
>
> - if (dev->irq_enabled)
> - drm_irq_uninstall(dev);
> -
> + drm_irq_uninstall(dev);
Removing this check would at least result in an error, [1] so rather
leave it in for now.
Instead, we could discuss if drm_irq_install() should become a managed
interface.
Best regards
Thomas
[1]
https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/drm_irq.c#L201
> pci_disable_msi(dev->pdev);
> +
> hibmc_kms_fini(priv);
> hibmc_mm_fini(priv);
> dev->dev_private = NULL;
> +
> return 0;
> }
>
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
[-- Attachment #1.1.2: OpenPGP_0x680DC11D530B7A23.asc --]
[-- Type: application/pgp-keys, Size: 4259 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
next prev parent reply other threads:[~2020-11-02 8:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-30 9:27 Tian Tao
2020-11-02 8:32 ` Thomas Zimmermann [this message]
2020-11-02 8:46 ` tiantao (H)
2020-11-02 9:03 ` Thomas Zimmermann
2020-11-02 9:06 ` tiantao (H)
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=2dbbbad0-53cf-52cc-3b6b-0d1547f7e085@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tiantao6@hisilicon.com \
--cc=xinliang.liu@linaro.org \
/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
all inboxes | Powered by JetHome®