public inbox for linux-remoteproc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remoteproc: qcom: Use PTR_ERR_OR_ZERO() in glink prob
@ 2017-11-28 22:32 Vasyl Gomonovych
  2017-11-28 23:02 ` Bjorn Andersson
  0 siblings, 1 reply; 2+ messages in thread
From: Vasyl Gomonovych @ 2017-11-28 22:32 UTC (permalink / raw)
  To: ohad, bjorn.andersson, linux-remoteproc; +Cc: linux-kernel, gomonovych

Fix ptr_ret.cocci warnings:
drivers/remoteproc/qcom_common.c:60:8-14: WARNING: PTR_ERR_OR_ZERO can be used

Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
---
 drivers/remoteproc/qcom_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c
index d487040b528b..e9b5f2a98c4d 100644
--- a/drivers/remoteproc/qcom_common.c
+++ b/drivers/remoteproc/qcom_common.c
@@ -57,7 +57,7 @@ static int glink_subdev_probe(struct rproc_subdev *subdev)
 
 	glink->edge = qcom_glink_smem_register(glink->dev, glink->node);
 
-	return IS_ERR(glink->edge) ? PTR_ERR(glink->edge) : 0;
+	return PTR_ERR_OR_ZERO(glink->edge);
 }
 
 static void glink_subdev_remove(struct rproc_subdev *subdev)
-- 
1.9.1

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

* Re: [PATCH] remoteproc: qcom: Use PTR_ERR_OR_ZERO() in glink prob
  2017-11-28 22:32 [PATCH] remoteproc: qcom: Use PTR_ERR_OR_ZERO() in glink prob Vasyl Gomonovych
@ 2017-11-28 23:02 ` Bjorn Andersson
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Andersson @ 2017-11-28 23:02 UTC (permalink / raw)
  To: Vasyl Gomonovych; +Cc: ohad, linux-remoteproc, linux-kernel

On Tue 28 Nov 14:32 PST 2017, Vasyl Gomonovych wrote:

> Fix ptr_ret.cocci warnings:
> drivers/remoteproc/qcom_common.c:60:8-14: WARNING: PTR_ERR_OR_ZERO can be used
> 
> Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
> 
> Generated by: scripts/coccinelle/api/ptr_ret.cocci
> 
> Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>

Applied.

Thanks,
Bjorn

> ---
>  drivers/remoteproc/qcom_common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c
> index d487040b528b..e9b5f2a98c4d 100644
> --- a/drivers/remoteproc/qcom_common.c
> +++ b/drivers/remoteproc/qcom_common.c
> @@ -57,7 +57,7 @@ static int glink_subdev_probe(struct rproc_subdev *subdev)
>  
>  	glink->edge = qcom_glink_smem_register(glink->dev, glink->node);
>  
> -	return IS_ERR(glink->edge) ? PTR_ERR(glink->edge) : 0;
> +	return PTR_ERR_OR_ZERO(glink->edge);
>  }
>  
>  static void glink_subdev_remove(struct rproc_subdev *subdev)
> -- 
> 1.9.1
> 

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

end of thread, other threads:[~2017-11-28 23:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-28 22:32 [PATCH] remoteproc: qcom: Use PTR_ERR_OR_ZERO() in glink prob Vasyl Gomonovych
2017-11-28 23:02 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox