Skip to content

Commit 21176c0

Browse files
konisakpm00
authored andcommitted
nilfs2: use the BITS_PER_LONG macro
The macros NILFS_BMAP_KEY_BIT and NILFS_BMAP_NEW_PTR_INIT calculate, within their definitions, the number of bits in an unsigned long variable. Use the BITS_PER_LONG macro to make them simpler. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ryusuke Konishi <[email protected]> Cc: Huang Xiaojia <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 9abca1a commit 21176c0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

fs/nilfs2/bmap.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,8 @@ struct nilfs_bmap_operations {
8787

8888

8989
#define NILFS_BMAP_SIZE (NILFS_INODE_BMAP_SIZE * sizeof(__le64))
90-
#define NILFS_BMAP_KEY_BIT (sizeof(unsigned long) * 8 /* CHAR_BIT */)
91-
#define NILFS_BMAP_NEW_PTR_INIT \
92-
(1UL << (sizeof(unsigned long) * 8 /* CHAR_BIT */ - 1))
90+
#define NILFS_BMAP_KEY_BIT BITS_PER_LONG
91+
#define NILFS_BMAP_NEW_PTR_INIT (1UL << (BITS_PER_LONG - 1))
9392

9493
static inline int nilfs_bmap_is_new_ptr(unsigned long ptr)
9594
{

0 commit comments

Comments
 (0)