Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1222504

Re: [PATCH 10/16] Staging: lustre: obdclass: genops.c: Remove explicit NULL comparison

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH 10/16] Staging: lustre: obdclass: genops.c: Remove explicit NULL comparison
Date 2015-09-11 05:00 +0200
Message-ID <q7mJb-5pm-9@gated-at.bofh.it> (permalink)
References <q7lWN-441-3@gated-at.bofh.it> <q7lWO-441-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 10/16] Staging: lustre: obdclass: genops.c: Remove explicit NULL comparison Shraddha Barke <shraddha.6596@gmail.com> - 2015-09-11 04:10 +0200
  Re: [PATCH 10/16] Staging: lustre: obdclass: genops.c: Remove  explicit NULL comparison Joe Perches <joe@perches.com> - 2015-09-11 05:00 +0200

csiph-web