staging: lustre: discard LOWEST_BIT_SET()
authorNeilBrown <neilb@suse.com>
Mon, 21 May 2018 04:35:12 +0000 (14:35 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 May 2018 16:29:10 +0000 (18:29 +0200)
This macro is only used once to test if a value is
a power of two.  So use is_power_of_2() instead and
discard the macro.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/include/linux/libcfs/libcfs.h
drivers/staging/lustre/lnet/lnet/lib-eq.c

index 7259544..084150e 100644 (file)
@@ -89,8 +89,6 @@
 
 #define LIBCFS_VERSION "0.7.0"
 
-#define LOWEST_BIT_SET(x)       ((x) & ~((x) - 1))
-
 /*
  * One jiffy
  */
index ea53b5c..c78e703 100644 (file)
@@ -225,7 +225,7 @@ lnet_eq_enqueue_event(struct lnet_eq *eq, struct lnet_event *ev)
        lnet_eq_wait_lock();
        ev->sequence = eq->eq_enq_seq++;
 
-       LASSERT(eq->eq_size == LOWEST_BIT_SET(eq->eq_size));
+       LASSERT(is_power_of_2(eq->eq_size));
        index = ev->sequence & (eq->eq_size - 1);
 
        eq->eq_events[index] = *ev;