All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Dave Chinner <david@fromorbit.com>
Cc: kernel-janitors@vger.kernel.org, xfs@oss.sgi.com
Subject: [patch v2] [XFS] small cleanup in xfs_lowbit64()
Date: Thu, 22 May 2014 14:04:05 +0000	[thread overview]
Message-ID: <20140522140405.GA27116@mwanda> (raw)
In-Reply-To: <20140521142909.GA22281@infradead.org>

There are two checkpatch.pl complaints here because of the bad indenting
and because of the assignment inside the condition.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
v2: more cleanups

diff --git a/fs/xfs/xfs_bit.h b/fs/xfs/xfs_bit.h
index f1e3c90..e1649c0 100644
--- a/fs/xfs/xfs_bit.h
+++ b/fs/xfs/xfs_bit.h
@@ -66,8 +66,11 @@ static inline int xfs_lowbit64(__uint64_t v)
 		n = ffs(w);
 	} else {	/* upper bits */
 		w = (__uint32_t)(v >> 32);
-		if (w && (n = ffs(w)))
-		n += 32;
+		if (w) {
+			n = ffs(w);
+			if (n)
+				n += 32;
+		}
 	}
 	return n - 1;
 }

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Dave Chinner <david@fromorbit.com>
Cc: kernel-janitors@vger.kernel.org, xfs@oss.sgi.com
Subject: [patch v2] [XFS] small cleanup in xfs_lowbit64()
Date: Thu, 22 May 2014 17:04:05 +0300	[thread overview]
Message-ID: <20140522140405.GA27116@mwanda> (raw)
In-Reply-To: <20140521142909.GA22281@infradead.org>

There are two checkpatch.pl complaints here because of the bad indenting
and because of the assignment inside the condition.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
v2: more cleanups

diff --git a/fs/xfs/xfs_bit.h b/fs/xfs/xfs_bit.h
index f1e3c90..e1649c0 100644
--- a/fs/xfs/xfs_bit.h
+++ b/fs/xfs/xfs_bit.h
@@ -66,8 +66,11 @@ static inline int xfs_lowbit64(__uint64_t v)
 		n = ffs(w);
 	} else {	/* upper bits */
 		w = (__uint32_t)(v >> 32);
-		if (w && (n = ffs(w)))
-		n += 32;
+		if (w) {
+			n = ffs(w);
+			if (n)
+				n += 32;
+		}
 	}
 	return n - 1;
 }

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2014-05-22 14:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-21 12:27 [patch] [XFS] indent an if statement Dan Carpenter
2014-05-21 12:27 ` Dan Carpenter
2014-05-21 12:44 ` Eric Sandeen
2014-05-21 12:44   ` Eric Sandeen
2014-05-21 14:29 ` Christoph Hellwig
2014-05-21 14:29   ` Christoph Hellwig
2014-05-21 14:35   ` Dan Carpenter
2014-05-21 14:35     ` Dan Carpenter
2014-05-21 16:50     ` walter harms
2014-05-21 16:50       ` walter harms
2014-05-22 10:01       ` Christoph Hellwig
2014-05-22 10:01         ` Christoph Hellwig
2014-05-22 13:31         ` Mark Tinguely
2014-05-22 13:31           ` Mark Tinguely
2014-05-22 14:04   ` Dan Carpenter [this message]
2014-05-22 14:04     ` [patch v2] [XFS] small cleanup in xfs_lowbit64() 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=20140522140405.GA27116@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=david@fromorbit.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=xfs@oss.sgi.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.