All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/omap: Use ERR_CAST directly instead of RR_PTR(PTR_ERR())
@ 2018-09-11 11:54 ` zhong jiang
  0 siblings, 0 replies; 5+ messages in thread
From: zhong jiang @ 2018-09-11 11:54 UTC (permalink / raw)
  To: airlied, tomi.valkeinen
  Cc: sre, laurent.pinchart, afd, dri-devel, linux-kernel

We prefer to use ERR_CAST to do so.
The issue is detected with the help of Coccinelle.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 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 cb80dda..1fc46b2 100644
--- a/drivers/gpu/drm/omapdrm/dss/dss.c
+++ b/drivers/gpu/drm/omapdrm/dss/dss.c
@@ -956,7 +956,7 @@ struct dss_debugfs_entry *
 				&dss_debug_fops);
 	if (IS_ERR(d)) {
 		kfree(entry);
-		return ERR_PTR(PTR_ERR(d));
+		return ERR_CAST(d);
 	}
 
 	entry->dentry = d;
-- 
1.7.12.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] drm/omap: Use ERR_CAST directly instead of RR_PTR(PTR_ERR())
@ 2018-09-11 11:54 ` zhong jiang
  0 siblings, 0 replies; 5+ messages in thread
From: zhong jiang @ 2018-09-11 11:54 UTC (permalink / raw)
  To: airlied, tomi.valkeinen
  Cc: sre, laurent.pinchart, afd, dri-devel, linux-kernel

We prefer to use ERR_CAST to do so.
The issue is detected with the help of Coccinelle.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 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 cb80dda..1fc46b2 100644
--- a/drivers/gpu/drm/omapdrm/dss/dss.c
+++ b/drivers/gpu/drm/omapdrm/dss/dss.c
@@ -956,7 +956,7 @@ struct dss_debugfs_entry *
 				&dss_debug_fops);
 	if (IS_ERR(d)) {
 		kfree(entry);
-		return ERR_PTR(PTR_ERR(d));
+		return ERR_CAST(d);
 	}
 
 	entry->dentry = d;
-- 
1.7.12.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/omap: Use ERR_CAST directly instead of RR_PTR(PTR_ERR())
  2018-09-11 11:54 ` zhong jiang
  (?)
@ 2018-09-11 21:19 ` Laurent Pinchart
  -1 siblings, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2018-09-11 21:19 UTC (permalink / raw)
  To: zhong jiang; +Cc: airlied, tomi.valkeinen, sre, afd, dri-devel, linux-kernel

Hi Zhong Jiang,

Thank you for the patch.

On Tuesday, 11 September 2018 14:54:35 EEST zhong jiang wrote:
> We prefer to use ERR_CAST to do so.
> The issue is detected with the help of Coccinelle.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

I expect Tomi to take this patch in his tree, but I also applied it to mine to 
make sure it won't be forgotten.

> ---
>  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 cb80dda..1fc46b2 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dss.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dss.c
> @@ -956,7 +956,7 @@ struct dss_debugfs_entry *
>  				&dss_debug_fops);
>  	if (IS_ERR(d)) {
>  		kfree(entry);
> -		return ERR_PTR(PTR_ERR(d));
> +		return ERR_CAST(d);
>  	}
> 
>  	entry->dentry = d;


-- 
Regards,

Laurent Pinchart




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/omap: Use ERR_CAST directly instead of RR_PTR(PTR_ERR())
  2018-09-11 11:54 ` zhong jiang
@ 2018-09-26  9:08   ` Tomi Valkeinen
  -1 siblings, 0 replies; 5+ messages in thread
From: Tomi Valkeinen @ 2018-09-26  9:08 UTC (permalink / raw)
  To: zhong jiang, airlied; +Cc: sre, laurent.pinchart, afd, dri-devel, linux-kernel

On 11/09/18 14:54, zhong jiang wrote:
> We prefer to use ERR_CAST to do so.
> The issue is detected with the help of Coccinelle.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
>  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 cb80dda..1fc46b2 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dss.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dss.c
> @@ -956,7 +956,7 @@ struct dss_debugfs_entry *
>  				&dss_debug_fops);
>  	if (IS_ERR(d)) {
>  		kfree(entry);
> -		return ERR_PTR(PTR_ERR(d));
> +		return ERR_CAST(d);
>  	}
>  
>  	entry->dentry = d;
> 

Thanks, picked this up.

 Tomi

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/omap: Use ERR_CAST directly instead of RR_PTR(PTR_ERR())
@ 2018-09-26  9:08   ` Tomi Valkeinen
  0 siblings, 0 replies; 5+ messages in thread
From: Tomi Valkeinen @ 2018-09-26  9:08 UTC (permalink / raw)
  To: zhong jiang, airlied; +Cc: sre, laurent.pinchart, afd, dri-devel, linux-kernel

On 11/09/18 14:54, zhong jiang wrote:
> We prefer to use ERR_CAST to do so.
> The issue is detected with the help of Coccinelle.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
>  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 cb80dda..1fc46b2 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dss.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dss.c
> @@ -956,7 +956,7 @@ struct dss_debugfs_entry *
>  				&dss_debug_fops);
>  	if (IS_ERR(d)) {
>  		kfree(entry);
> -		return ERR_PTR(PTR_ERR(d));
> +		return ERR_CAST(d);
>  	}
>  
>  	entry->dentry = d;
> 

Thanks, picked this up.

 Tomi

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-09-26  9:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-11 11:54 [PATCH] drm/omap: Use ERR_CAST directly instead of RR_PTR(PTR_ERR()) zhong jiang
2018-09-11 11:54 ` zhong jiang
2018-09-11 21:19 ` Laurent Pinchart
2018-09-26  9:08 ` Tomi Valkeinen
2018-09-26  9:08   ` Tomi Valkeinen

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.