All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Nachammai Karuppiah <nachukannan@gmail.com>
Cc: Eric Anholt <eric@anholt.net>, Stefan Wahren <wahrenst@gmx.net>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH] staging: vc04_services: Avoid NULL comparison
Date: Thu, 3 Oct 2019 23:10:15 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1910032309220.3451@hadrien> (raw)
In-Reply-To: <1570122078-23942-1-git-send-email-nachukannan@gmail.com>



On Thu, 3 Oct 2019, Nachammai Karuppiah wrote:

> Remove NULL comparison. Issue found using checkpatch.pl
>
> Signed-off-by: Nachammai Karuppiah <nachukannan@gmail.com>
> ---
>  drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> index 17a4f2c..a2268d5 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
> @@ -628,7 +628,7 @@ int32_t vchi_service_open(VCHI_INSTANCE_T instance_handle,
>  		}
>  	}
>
> -	return (service != NULL) ? 0 : -1;
> +	return (service) ? 0 : -1;

You don't need the parentheses.

julia

>  }
>  EXPORT_SYMBOL(vchi_service_open);
>
> --
> 2.7.4
>
> --
> 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 view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1570122078-23942-1-git-send-email-nachukannan%40gmail.com.
>


  parent reply	other threads:[~2019-10-03 21:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-03 17:01 [PATCH] staging: vc04_services: Avoid NULL comparison Nachammai Karuppiah
2019-10-03 17:18 ` Stefan Wahren
2019-10-03 17:41   ` Nachammai Karuppiah
2019-10-03 21:10 ` Julia Lawall [this message]
2019-10-04  9:38   ` [Outreachy kernel] " Nachammai Karuppiah

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=alpine.DEB.2.21.1910032309220.3451@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=eric@anholt.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=nachukannan@gmail.com \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=wahrenst@gmx.net \
    /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 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.