From 71872e9cc2af4dca1903ebc57daa15f08c795d86 Mon Sep 17 00:00:00 2001 From: Aya Mahfouz Date: Tue, 17 Nov 2015 22:06:40 +0200 Subject: [PATCH] staging: lustre: hash.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. Reviewed-by: Andreas Dilger Signed-off-by: Aya Mahfouz Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/libcfs/hash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/libcfs/hash.c b/drivers/staging/lustre/lustre/libcfs/hash.c index d285117af3ad..4d50510434be 100644 --- a/drivers/staging/lustre/lustre/libcfs/hash.c +++ b/drivers/staging/lustre/lustre/libcfs/hash.c @@ -107,6 +107,7 @@ * table. Also, user can break the iteration by return 1 in callback. */ #include +#include #include "../../include/linux/libcfs/libcfs.h" @@ -1777,7 +1778,7 @@ cfs_hash_rehash_cancel_locked(struct cfs_hash *hs) for (i = 2; cfs_hash_is_rehashing(hs); i++) { cfs_hash_unlock(hs, 1); /* raise console warning while waiting too long */ - CDEBUG(IS_PO2(i >> 3) ? D_WARNING : D_INFO, + CDEBUG(is_power_of_2(i >> 3) ? D_WARNING : D_INFO, "hash %s is still rehashing, rescheded %d\n", hs->hs_name, i - 1); cond_resched(); -- 2.39.2