mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 03:06:50 -04:00
staging: lustre: ldlm_extent.c: replace IS_PO2 by is_power_of_2
Replaces IS_PO2 by is_power_of_2. It is more accurate to use is_power_of_2 since it returns 1 for numbers that are powers of 2 only whereas IS_PO2 returns 1 for 0 and numbers that are powers of 2. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cb32649d08
commit
5f4179e04b
@@ -149,7 +149,7 @@ static inline int lock_mode_to_index(ldlm_mode_t mode)
|
||||
int index;
|
||||
|
||||
LASSERT(mode != 0);
|
||||
LASSERT(IS_PO2(mode));
|
||||
LASSERT(is_power_of_2(mode));
|
||||
for (index = -1; mode; index++)
|
||||
mode >>= 1;
|
||||
LASSERT(index < LCK_MODE_NUM);
|
||||
|
||||
Reference in New Issue
Block a user