summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>2015-10-29 00:54:09 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-11-16 04:02:47 (GMT)
commit5f4179e04b31441b0b7995d14320a457aafba01b (patch)
treec15f520971dd5158784dc32593cc1a5d9fbb5194 /drivers/staging
parentcb32649d087d513bb6e0f90dda0a686a6662b519 (diff)
downloadlinux-5f4179e04b31441b0b7995d14320a457aafba01b.tar.xz
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/lustre/lustre/ldlm/ldlm_extent.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c b/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c
index c787888..9c70f31 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c
@@ -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);