mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Tian Tao <tiantao6@hisilicon.com>,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	airlied@linux.ie, daniel@ffwll.ch
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/drv: switch to using devm_add_action_or_reset()
Date: Tue, 8 Dec 2020 08:58:39 +0100	[thread overview]
Message-ID: <84176f0f-56e2-c8dd-2f4d-651ec4abe435@suse.de> (raw)
In-Reply-To: <1607303055-5199-1-git-send-email-tiantao6@hisilicon.com>


[-- Attachment #1.1: Type: text/plain, Size: 1249 bytes --]



Am 07.12.20 um 02:04 schrieb Tian Tao:
> switch to using devm_add_action_or_reset() instead of devm_add_action.
> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>

I'm surprised that devm_drm_dev_init() didn't already use 
devm_add_action_or_reset(). But it doesn't look special, so

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
>   drivers/gpu/drm/drm_drv.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 7343038..b92f7fd 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -675,11 +675,8 @@ static int devm_drm_dev_init(struct device *parent,
>   	if (ret)
>   		return ret;
>   
> -	ret = devm_add_action(parent, devm_drm_dev_init_release, dev);
> -	if (ret)
> -		devm_drm_dev_init_release(dev);
> -
> -	return ret;
> +	return devm_add_action_or_reset(parent,
> +					devm_drm_dev_init_release, dev);
>   }
>   
>   void *__devm_drm_dev_alloc(struct device *parent,
> 

-- 
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

      reply	other threads:[~2020-12-08  7:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-07  1:04 Tian Tao
2020-12-08  7:58 ` Thomas Zimmermann [this message]

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=84176f0f-56e2-c8dd-2f4d-651ec4abe435@suse.de \
    --to=tzimmermann@suse.de \
    --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=tiantao6@hisilicon.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

all inboxes | Powered by JetHome®