All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ioana Ciornei <ciorneiioana@gmail.com>
To: ceph-devel@vger.kernel.org
Cc: elder@ieee.org, Ioana Ciornei <ciorneiioana@gmail.com>
Subject: [PATCH 2/6] net: ceph: messenger: fix coding style comparison to NULL
Date: Wed, 27 Jan 2016 02:43:35 +0200	[thread overview]
Message-ID: <0bb28068731f24986663bdd1866f7342fb5139fe.1453853617.git.ciorneiioana@gmail.com> (raw)
In-Reply-To: <cover.1453853617.git.ciorneiioana@gmail.com>
In-Reply-To: <cover.1453853617.git.ciorneiioana@gmail.com>

This patch fixes the comparison to NULL format in order to follow linux
kernel coding style.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
---
 net/ceph/messenger.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 424d76b..7a8bc51 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -3249,7 +3249,7 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags,
 	struct ceph_msg *m;
 
 	m = kmem_cache_zalloc(ceph_msg_cache, flags);
-	if (m == NULL)
+	if (!m)
 		goto out;
 
 	m->hdr.type = cpu_to_le16(type);
@@ -3263,7 +3263,7 @@ struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags,
 	/* front */
 	if (front_len) {
 		m->front.iov_base = ceph_kvmalloc(front_len, flags);
-		if (m->front.iov_base == NULL) {
+		if (!m->front.iov_base) {
 			dout("ceph_msg_new can't allocate %d bytes\n",
 			     front_len);
 			goto out2;
-- 
2.6.4


  parent reply	other threads:[~2016-01-26 22:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27  0:43 [PATCH 0/6] net: ceph: messenger: code cleanup Ioana Ciornei
2016-01-27  0:43 ` [PATCH 1/6] net: ceph: messenger: remove unnecessary blank spaces Ioana Ciornei
2016-01-27  0:43 ` Ioana Ciornei [this message]
2016-01-27  0:43 ` [PATCH 3/6] net: ceph: messenger: add blank line after declarations Ioana Ciornei
2016-01-27  0:43 ` [PATCH 4/6] net: ceph: messenger: properly align function parameters Ioana Ciornei
2016-01-27  0:43 ` [PATCH 5/6] net: ceph: messenger: change printk to pr_warn Ioana Ciornei
2016-01-27  0:43 ` [PATCH 6/6] net: ceph: messenger: add braces to all arms of conditional statement Ioana Ciornei
2016-01-27 11:17 ` [PATCH 0/6] net: ceph: messenger: code cleanup Ilya Dryomov

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=0bb28068731f24986663bdd1866f7342fb5139fe.1453853617.git.ciorneiioana@gmail.com \
    --to=ciorneiioana@gmail.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=elder@ieee.org \
    /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.