All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: fsl-mc: Use !x instead of x == NULL.
@ 2016-09-16  9:36 Sandhya Bankar
  2016-09-16  9:37 ` [Outreachy kernel] " Julia Lawall
  2016-09-17 21:28 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Sandhya Bankar @ 2016-09-16  9:36 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, stuart.yoder, mbrugger, german.rivera

Use !x instead of x == NULL.
This issue was found by checkpatch.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
 drivers/staging/fsl-mc/bus/fsl-mc-msi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/fsl-mc-msi.c
index cc19092..bc1ad1a 100755
--- a/drivers/staging/fsl-mc/bus/fsl-mc-msi.c
+++ b/drivers/staging/fsl-mc/bus/fsl-mc-msi.c
@@ -50,7 +50,7 @@ static void fsl_mc_msi_update_dom_ops(struct msi_domain_info *info)
 	/*
 	 * set_desc should not be set by the caller
 	 */
-	if (ops->set_desc == NULL)
+	if (!ops->set_desc)
 		ops->set_desc = fsl_mc_msi_set_desc;
 }
 
@@ -140,7 +140,7 @@ static void fsl_mc_msi_update_chip_ops(struct msi_domain_info *info)
 	/*
 	 * irq_write_msi_msg should not be set by the caller
 	 */
-	if (chip->irq_write_msi_msg == NULL)
+	if (!chip->irq_write_msi_msg)
 		chip->irq_write_msi_msg = fsl_mc_msi_write_msg;
 }
 
-- 
1.7.1



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

* Re: [Outreachy kernel] [PATCH] Staging: fsl-mc: Use !x instead of x == NULL.
  2016-09-16  9:36 [PATCH] Staging: fsl-mc: Use !x instead of x == NULL Sandhya Bankar
@ 2016-09-16  9:37 ` Julia Lawall
  2016-09-17 21:28 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2016-09-16  9:37 UTC (permalink / raw)
  To: Sandhya Bankar
  Cc: outreachy-kernel, gregkh, stuart.yoder, mbrugger, german.rivera

On Fri, 16 Sep 2016, Sandhya Bankar wrote:

> Use !x instead of x == NULL.
> This issue was found by checkpatch.

You could do this with Coccinelle.

julia

>
> Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
> ---
>  drivers/staging/fsl-mc/bus/fsl-mc-msi.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/fsl-mc-msi.c
> index cc19092..bc1ad1a 100755
> --- a/drivers/staging/fsl-mc/bus/fsl-mc-msi.c
> +++ b/drivers/staging/fsl-mc/bus/fsl-mc-msi.c
> @@ -50,7 +50,7 @@ static void fsl_mc_msi_update_dom_ops(struct msi_domain_info *info)
>  	/*
>  	 * set_desc should not be set by the caller
>  	 */
> -	if (ops->set_desc == NULL)
> +	if (!ops->set_desc)
>  		ops->set_desc = fsl_mc_msi_set_desc;
>  }
>
> @@ -140,7 +140,7 @@ static void fsl_mc_msi_update_chip_ops(struct msi_domain_info *info)
>  	/*
>  	 * irq_write_msi_msg should not be set by the caller
>  	 */
> -	if (chip->irq_write_msi_msg == NULL)
> +	if (!chip->irq_write_msi_msg)
>  		chip->irq_write_msi_msg = fsl_mc_msi_write_msg;
>  }
>
> --
> 1.7.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160916093641.GA4100%40sandhya.
> For more options, visit https://groups.google.com/d/optout.
>


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

* Re: [PATCH] Staging: fsl-mc: Use !x instead of x == NULL.
  2016-09-16  9:36 [PATCH] Staging: fsl-mc: Use !x instead of x == NULL Sandhya Bankar
  2016-09-16  9:37 ` [Outreachy kernel] " Julia Lawall
@ 2016-09-17 21:28 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2016-09-17 21:28 UTC (permalink / raw)
  To: Sandhya Bankar; +Cc: outreachy-kernel, stuart.yoder, mbrugger, german.rivera

On Fri, Sep 16, 2016 at 03:06:41PM +0530, Sandhya Bankar wrote:
> Use !x instead of x == NULL.
> This issue was found by checkpatch.
> 
> Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
> Reviewed-by: Matthias Brugger <mbrugger@suse.com>
> ---
>  drivers/staging/fsl-mc/bus/fsl-mc-msi.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/fsl-mc-msi.c
> index cc19092..bc1ad1a 100755

Same permission here as well.


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

end of thread, other threads:[~2016-09-17 21:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-16  9:36 [PATCH] Staging: fsl-mc: Use !x instead of x == NULL Sandhya Bankar
2016-09-16  9:37 ` [Outreachy kernel] " Julia Lawall
2016-09-17 21:28 ` Greg KH

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.