All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Dafna Hirschfeld <dafna3@gmail.com>
Cc: oleg.drokin@intel.com, andreas.dilger@intel.com,
	jsimmons@infradead.org,  gregkh@linuxfoundation.org,
	outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH v2 1/3] staging: lustre: obdclass: Fix comparison to NULL
Date: Sun, 4 Mar 2018 20:04:20 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1803042003320.2182@hadrien> (raw)
In-Reply-To: <2af5f92fecc211d04770d19600874f3345f97200.1520153895.git.dafna3@gmail.com>



On Sun, 4 Mar 2018, Dafna Hirschfeld wrote:

> Replace comparison to NULL with a 'not' operator.
> Issue found with checkpatch.
>
> Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>

Acked-by: Julia Lawall <julia.lawall@lip6.fr>

> ---
>  drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
> index e1f4ef2..64cc746 100644
> --- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
> +++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
> @@ -1585,7 +1585,7 @@ int ldebugfs_seq_create(struct dentry *parent, const char *name,
>  	struct dentry *entry;
>
>  	/* Disallow secretly (un)writable entries. */
> -	LASSERT((seq_fops->write == NULL) == ((mode & 0222) == 0));
> +	LASSERT((!seq_fops->write) == ((mode & 0222) == 0));

! actually binds more tightly than ==, but I think that keeping the
parentheses is helpful for clarity.

julia

>
>  	entry = debugfs_create_file(name, mode, parent, data, seq_fops);
>  	if (IS_ERR_OR_NULL(entry))
> --
> 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 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/2af5f92fecc211d04770d19600874f3345f97200.1520153895.git.dafna3%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


  reply	other threads:[~2018-03-04 19:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-04  9:09 [PATCH v2 0/3] Cleanup for staging lustre obdclass Dafna Hirschfeld
2018-03-04  9:09 ` [PATCH v2 1/3] staging: lustre: obdclass: Fix comparison to NULL Dafna Hirschfeld
2018-03-04 19:04   ` Julia Lawall [this message]
2018-03-04  9:09 ` [PATCH v2 2/3] staging: lustre: obdclass: Add 'const' to char* array Dafna Hirschfeld
2018-03-04  9:09 ` [PATCH v2 3/3] staging: lustre: obdclass: Replace 'unsigned' with 'unsigned int' Dafna Hirschfeld
2018-03-04 19:05 ` [Outreachy kernel] [PATCH v2 0/3] Cleanup for staging lustre obdclass Julia Lawall
2018-03-04 19:37   ` Dafna Hirschfeld
2018-03-04 19:38     ` Julia Lawall

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.20.1803042003320.2182@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=andreas.dilger@intel.com \
    --cc=dafna3@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jsimmons@infradead.org \
    --cc=oleg.drokin@intel.com \
    --cc=outreachy-kernel@googlegroups.com \
    /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.