[PATCH 03/14] PMFS: Remove use of unreasonably large constant
Matthew Wilcox
matthew.r.wilcox at intel.com
Mon Oct 7 09:36:27 EDT 2013
From: Matthew Wilcox <willy at linux.intel.com>
Sparse warned:
fs/pmfs/bbuild.c:71:31: warning: constant 0xFFFFFFFFFFFFFF00 is so big it is unsigned long
The code is actually trying to determine whether the bottom 8 bits are
all clear, which we already calculated on the previous line. So just
test that instead.
Signed-off-by: Matthew Wilcox <matthew.r.wilcox at intel.com>
---
fs/pmfs/bbuild.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/pmfs/bbuild.c b/fs/pmfs/bbuild.c
index 0c18389..6be800e 100644
--- a/fs/pmfs/bbuild.c
+++ b/fs/pmfs/bbuild.c
@@ -68,9 +68,9 @@ static void pmfs_init_blockmap_from_inode(struct super_block *sb)
sbi->num_blocknode_allocated = 0;
for (i=0; i<num_blocknode; i++) {
index = i & 0xFF;
- if (i == (i & 0xFFFFFFFFFFFFFF00)) {
+ if (index == 0) {
/* Find and get new data block */
- blocknr = i >> 8; //256 Entries in a block
+ blocknr = i >> 8; /* 256 Entries in a block */
bp = __pmfs_find_data_block(sb, pi, blocknr);
p = pmfs_get_block(sb, bp);
}
--
1.8.4.rc3
More information about the Linux-pmfs
mailing list