All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Simmons <jsimmons@infradead.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org,
	Andreas Dilger <andreas.dilger@intel.com>,
	Oleg Drokin <oleg.drokin@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lustre Development List <lustre-devel@lists.lustre.org>,
	James Simmons <jsimmons@infradead.org>
Subject: [PATCH 04/19] staging: lustre: libcfs: remove explicit test of NULL variable
Date: Thu, 17 Nov 2016 14:35:42 -0500	[thread overview]
Message-ID: <1479411357-28979-5-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1479411357-28979-1-git-send-email-jsimmons@infradead.org>

Remove != NULL which is not needed to test key existence.

Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lnet/libcfs/libcfs_lock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_lock.c b/drivers/staging/lustre/lnet/libcfs/libcfs_lock.c
index 83543f9..1deea76 100644
--- a/drivers/staging/lustre/lnet/libcfs/libcfs_lock.c
+++ b/drivers/staging/lustre/lnet/libcfs/libcfs_lock.c
@@ -73,7 +73,7 @@ struct cfs_percpt_lock *
 
 	cfs_percpt_for_each(lock, i, pcl->pcl_locks) {
 		spin_lock_init(lock);
-		if (keys != NULL)
+		if (keys)
 			lockdep_set_class(lock, &keys[i]);
 	}
 
-- 
1.7.1

WARNING: multiple messages have this Message-ID (diff)
From: James Simmons <jsimmons@infradead.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org,
	Andreas Dilger <andreas.dilger@intel.com>,
	Oleg Drokin <oleg.drokin@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lustre Development List <lustre-devel@lists.lustre.org>,
	James Simmons <jsimmons@infradead.org>
Subject: [lustre-devel] [PATCH 04/19] staging: lustre: libcfs: remove explicit test of NULL variable
Date: Thu, 17 Nov 2016 14:35:42 -0500	[thread overview]
Message-ID: <1479411357-28979-5-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1479411357-28979-1-git-send-email-jsimmons@infradead.org>

Remove != NULL which is not needed to test key existence.

Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lnet/libcfs/libcfs_lock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_lock.c b/drivers/staging/lustre/lnet/libcfs/libcfs_lock.c
index 83543f9..1deea76 100644
--- a/drivers/staging/lustre/lnet/libcfs/libcfs_lock.c
+++ b/drivers/staging/lustre/lnet/libcfs/libcfs_lock.c
@@ -73,7 +73,7 @@ struct cfs_percpt_lock *
 
 	cfs_percpt_for_each(lock, i, pcl->pcl_locks) {
 		spin_lock_init(lock);
-		if (keys != NULL)
+		if (keys)
 			lockdep_set_class(lock, &keys[i]);
 	}
 
-- 
1.7.1

  parent reply	other threads:[~2016-11-17 19:40 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-17 19:35 [PATCH 00/19] LNet/libcfs checkpatch and style cleanups James Simmons
2016-11-17 19:35 ` [lustre-devel] " James Simmons
2016-11-17 19:35 ` [PATCH 01/19] staging: lustre: lnet: don't use bare unsigned James Simmons
2016-11-17 19:35   ` [lustre-devel] " James Simmons
2016-11-17 19:35 ` [PATCH 02/19] staging: lustre: lnet: resolve trailing */ errors James Simmons
2016-11-17 19:35   ` [lustre-devel] " James Simmons
2016-11-17 19:35 ` [PATCH 03/19] staging: lustre: libcfs: use static const char const * for a suffixes array James Simmons
2016-11-17 19:35   ` [lustre-devel] " James Simmons
2016-11-17 19:35 ` James Simmons [this message]
2016-11-17 19:35   ` [lustre-devel] [PATCH 04/19] staging: lustre: libcfs: remove explicit test of NULL variable James Simmons
2016-11-17 19:35 ` [PATCH 05/19] staging: lustre: libcfs: fix aligment issue James Simmons
2016-11-17 19:35   ` [lustre-devel] " James Simmons
2016-11-17 19:35 ` [PATCH 06/19] staging: lustre: lnet: fix misspelled word destroy James Simmons
2016-11-17 19:35   ` [lustre-devel] " James Simmons
2016-11-17 19:35 ` [PATCH 07/19] staging: lustre: lnet: remove unused lib_me_dump James Simmons
2016-11-17 19:35   ` [lustre-devel] " James Simmons
2016-11-17 19:35 ` [PATCH 08/19] staging: lustre: lnet: missing blank line after declaration James Simmons
2016-11-17 19:35   ` [lustre-devel] " James Simmons
2016-11-17 19:35 ` [PATCH 09/19] staging: lustre: lnet: fill in real lnet_md_t James Simmons
2016-11-17 19:35   ` [lustre-devel] " James Simmons
2016-11-17 19:35 ` [PATCH 10/19] staging: lustre: lnet: replace uninitialized_var James Simmons
2016-11-17 19:35   ` [lustre-devel] " James Simmons
2016-11-17 19:35 ` [PATCH 11/19] staging: lustre: libcfs: remove != 0 testing James Simmons
2016-11-17 19:35   ` [lustre-devel] " James Simmons
2016-11-17 19:35 ` [PATCH 12/19] staging: lustre: libcfs: remove == " James Simmons
2016-11-17 19:35   ` [lustre-devel] " James Simmons
2016-11-18 11:01   ` Dan Carpenter
2016-11-18 11:01     ` [lustre-devel] " Dan Carpenter
2016-11-18 16:46     ` James Simmons
2016-11-18 16:46       ` [lustre-devel] " James Simmons
2016-11-17 19:35 ` [PATCH 13/19] staging: lustre: libcfs: white space cleanup James Simmons
2016-11-17 19:35   ` [lustre-devel] " James Simmons
2016-11-17 19:35 ` [PATCH 14/19] staging: lustre: libcfs: fix misspelling of descriptor James Simmons
2016-11-17 19:35   ` [lustre-devel] " James Simmons
2016-11-17 19:35 ` [PATCH 15/19] staging: lustre: libcfs: Make char * array envp static constant James Simmons
2016-11-17 19:35   ` [lustre-devel] " James Simmons
2016-11-17 19:35 ` [PATCH 16/19] staging: lustre: libcfs: use pr_* instead of printk James Simmons
2016-11-17 19:35   ` [lustre-devel] " James Simmons
2016-11-17 19:35 ` [PATCH 17/19] staging: lustre: libcfs: remove use of __u* types James Simmons
2016-11-17 19:35   ` [lustre-devel] " James Simmons
2016-11-17 19:35 ` [PATCH 18/19] staging: lustre: lnet: use BIT macro in LNet selftest James Simmons
2016-11-17 19:35   ` [lustre-devel] " James Simmons
2016-11-17 19:35 ` [PATCH 19/19] staging: lustre: lnet: cleanup some of the > 80 line issues James Simmons
2016-11-17 19:35   ` [lustre-devel] " James Simmons

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=1479411357-28979-5-git-send-email-jsimmons@infradead.org \
    --to=jsimmons@infradead.org \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=oleg.drokin@intel.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.