public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Anjali Menon <cse.anjalimenon@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: android: ion: Fixing NULL comparison style
Date: Thu, 19 Nov 2015 09:36:19 -0800	[thread overview]
Message-ID: <20151119173619.GA15443@kroah.com> (raw)
In-Reply-To: <1447952393-8867-1-git-send-email-cse.anjalimenon@gmail.com>

On Thu, Nov 19, 2015 at 10:29:53PM +0530, Anjali Menon wrote:
> Using checkpatch.pl fixed the check.
> 
> CHECK: Comparison to NULL could be written "!data"
> 
> Signed-off-by: Anjali Menon <cse.anjalimenon@gmail.com>
> ---
>  drivers/staging/android/ion/compat_ion.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/android/ion/compat_ion.c b/drivers/staging/android/ion/compat_ion.c
> index a402fda..8a0df9c 100644
> --- a/drivers/staging/android/ion/compat_ion.c
> +++ b/drivers/staging/android/ion/compat_ion.c
> @@ -137,7 +137,7 @@ long compat_ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
>  
>  		data32 = compat_ptr(arg);
>  		data = compat_alloc_user_space(sizeof(*data));
> -		if (data == NULL)
> +		if ("!data" == NULL)

I don't think you compiled this code :(

      reply	other threads:[~2015-11-19 17:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-19 16:59 [PATCH] staging: android: ion: Fixing NULL comparison style Anjali Menon
2015-11-19 17:36 ` Greg KH [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=20151119173619.GA15443@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=cse.anjalimenon@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --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