From: Aya Mahfouz Date: Thu, 29 Oct 2015 00:54:09 +0000 (+0200) Subject: staging: lustre: ldlm_extent.c: replace IS_PO2 by is_power_of_2 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5f4179e04b31441b0b7995d14320a457aafba01b;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c b/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c index c787888eb8af..9c70f31ea56e 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);