staging: lustre: workitem.c: replace IS_PO2 by is_power_of_2
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Thu, 29 Oct 2015 00:57:33 +0000 (02:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Nov 2015 04:02:47 +0000 (20:02 -0800)
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 <andreas.dilger@intel.com>
Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/libcfs/workitem.c

index e1143a566ac4aaf712d20c5e5bd20530656f04e5..268dd6851af4baa6a276efd3d263f1d9bdb17850 100644 (file)
@@ -325,7 +325,7 @@ cfs_wi_sched_destroy(struct cfs_wi_sched *sched)
 
        spin_lock(&cfs_wi_data.wi_glock);
        while (sched->ws_nthreads > 0) {
-               CDEBUG(IS_PO2(++i) ? D_WARNING : D_NET,
+               CDEBUG(is_power_of_2(++i) ? D_WARNING : D_NET,
                       "waiting for %d threads of WI sched[%s] to terminate\n",
                       sched->ws_nthreads, sched->ws_name);