mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mario Bambagini <mario.bambagini@gmail.com>
To: oleg.drokin@intel.com
Cc: andreas.dilger@intel.com, gregkh@linuxfoundation.org,
	mario.bambagini@gmail.com, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 5/5] staging: lustre: modified comparisons against NULL
Date: Mon, 27 Jul 2015 21:20:25 +0200	[thread overview]
Message-ID: <1438024825-18120-5-git-send-email-mario.bambagini@gmail.com> (raw)
In-Reply-To: <1438024825-18120-1-git-send-email-mario.bambagini@gmail.com>

The explicit comparisons against NULL has been modified to be shorter.

The script checkpatch.pl does not return any other warning/error.

MB

Signed-off-by: Mario Bambagini <mario.bambagini@gmail.com>
---
 drivers/staging/lustre/lustre/llite/llite_capa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/llite_capa.c b/drivers/staging/lustre/lustre/llite/llite_capa.c
index 5162202..24590ae 100644
--- a/drivers/staging/lustre/lustre/llite/llite_capa.c
+++ b/drivers/staging/lustre/lustre/llite/llite_capa.c
@@ -236,7 +236,7 @@ static int capa_thread_main(void *unused)
 
 			/* NB iput() is in ll_update_capa() */
 			inode = igrab(ocapa->u.cli.inode);
-			if (inode == NULL) {
+			if (!inode) {
 				DEBUG_CAPA(D_ERROR, &ocapa->c_capa,
 					   "igrab failed for");
 				continue;
@@ -380,7 +380,7 @@ struct obd_capa *ll_mdscapa_get(struct inode *inode)
 	struct ll_inode_info *lli = ll_i2info(inode);
 	struct obd_capa *ocapa;
 
-	LASSERT(inode != NULL);
+	LASSERT(inode);
 
 	if ((ll_i2sbi(inode)->ll_flags & LL_SBI_MDS_CAPA) == 0)
 		return NULL;
-- 
2.1.4


  parent reply	other threads:[~2015-07-27 19:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-27 19:20 [PATCH v2 1/5] staging: lustre: fixed comments without */ on a separate line Mario Bambagini
2015-07-27 19:20 ` [PATCH v2 2/5] staging: lustre: fixed 80-char rule Mario Bambagini
2015-07-28 11:32   ` Sudip Mukherjee
2015-07-27 19:20 ` [PATCH v2 3/5] staging: lustre: fix bad alignment Mario Bambagini
2015-07-27 20:03   ` Dan Carpenter
2015-07-28 11:35   ` Sudip Mukherjee
2015-07-27 19:20 ` [PATCH v2 4/5] staging: lustre: added a space between concatenated strings Mario Bambagini
2015-07-27 19:20 ` Mario Bambagini [this message]
2015-07-27 20:04   ` [PATCH v2 5/5] staging: lustre: modified comparisons against NULL Dan Carpenter

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=1438024825-18120-5-git-send-email-mario.bambagini@gmail.com \
    --to=mario.bambagini@gmail.com \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®