linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: "Hernán Gonzalez" <hernan@vanguardiasur.com.ar>
Cc: <airlied@linux.ie>, <laurent.pinchart@ideasonboard.com>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/omap: dss: Use ERR_CAST instead of ERR_PTR(PTR_ERR())
Date: Wed, 23 May 2018 12:28:51 +0300	[thread overview]
Message-ID: <cf4b0152-7bd0-1993-f5bb-b55bce7c9186@ti.com> (raw)
In-Reply-To: <1526254581-4388-1-git-send-email-hernan@vanguardiasur.com.ar>

On 14/05/18 02:36, Hernán Gonzalez wrote:
> Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)).
> 
> drivers/gpu/drm/omapdrm/dss/dss.c:959:9-16: WARNING: ERR_CAST can be used with d
> Generated by: scripts/coccinelle/api/err_cast.cocci
> 
> Signed-off-by: Hernán Gonzalez <hernan@vanguardiasur.com.ar>
> ---
>  drivers/gpu/drm/omapdrm/dss/dss.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c
> index 0b908e9..be043c8 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dss.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dss.c
> @@ -956,7 +956,7 @@ dss_debugfs_create_file(struct dss_device *dss, const char *name,
>  				&dss_debug_fops);
>  	if (IS_ERR(d)) {
>  		kfree(entry);
> -		return ERR_PTR(PTR_ERR(d));
> +		return ERR_CAST(d);
>  	}
>  
>  	entry->dentry = d;
> 

Thanks, I've picked this up.

 Tomi

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

      reply	other threads:[~2018-05-23  9:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-13 23:36 [PATCH] drm/omap: dss: Use ERR_CAST instead of ERR_PTR(PTR_ERR()) Hernán Gonzalez
2018-05-23  9:28 ` Tomi Valkeinen [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=cf4b0152-7bd0-1993-f5bb-b55bce7c9186@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hernan@vanguardiasur.com.ar \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).