From: Joe Perches <joe@perches.com>
To: Shraddha Barke <shraddha.6596@gmail.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>,
Andreas Dilger <andreas.dilger@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Julia Lawall <Julia.Lawall@lip6.fr>,
HPDD-discuss@ml01.01.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 10/16] Staging: lustre: obdclass: genops.c: Remove explicit NULL comparison
Date: Thu, 10 Sep 2015 19:51:07 -0700 [thread overview]
Message-ID: <1441939867.15135.2.camel@perches.com> (raw)
In-Reply-To: <1441937051-2546-4-git-send-email-shraddha.6596@gmail.com>
On Fri, 2015-09-11 at 07:34 +0530, Shraddha Barke wrote:
> Remove explicit NULL comparison and write it in its simpler form.
> Replacement done with coccinelle:
Hi Shraddha.
If you are going to do these conversions, please
also do the equivalent != NULL conversions:
- e != NULL
+ e
> diff --git a/drivers/staging/lustre/lustre/obdclass/genops.c b/drivers/staging/lustre/lustre/obdclass/genops.c
[]
> @@ -178,9 +178,9 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
> - if (type->typ_dt_ops == NULL ||
> - type->typ_md_ops == NULL ||
> - type->typ_name == NULL)
> + if (!type->typ_dt_ops ||
> + !type->typ_md_ops ||
> + !type->typ_name)
prev parent reply other threads:[~2015-09-11 2:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 2:04 [PATCH 07/16] Staging: lustre: libcfs: libcfs_lock.c: Remove explicit NULL comparison Shraddha Barke
2015-09-11 2:04 ` [PATCH 08/16] Staging: lustre: libcfs: libcfs_mem.c: " Shraddha Barke
2015-09-11 2:04 ` [PATCH 09/16] Staging: lustre: obdclass: obd_config.c: " Shraddha Barke
2015-09-11 2:04 ` [PATCH 10/16] Staging: lustre: obdclass: genops.c: " Shraddha Barke
2015-09-11 2:51 ` Joe Perches [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=1441939867.15135.2.camel@perches.com \
--to=joe@perches.com \
--cc=HPDD-discuss@ml01.01.org \
--cc=Julia.Lawall@lip6.fr \
--cc=andreas.dilger@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg.drokin@intel.com \
--cc=shraddha.6596@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox