Commit 6f78a19702574008bbd333237380fa85be1c9e5d

Authored by Robert P. J. Day
Committed by David S. Miller
1 parent 9c969ffe1f

[SPARC64]: Use "is_power_of_2" macro for simplicity.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

include/asm-sparc64/vio.h
... ... @@ -8,6 +8,7 @@
8 8 #include <linux/spinlock.h>
9 9 #include <linux/completion.h>
10 10 #include <linux/list.h>
  11 +#include <linux/log2.h>
11 12  
12 13 #include <asm/ldc.h>
13 14 #include <asm/mdesc.h>
... ... @@ -257,8 +258,7 @@
257 258 static inline u32 vio_dring_avail(struct vio_dring_state *dr,
258 259 unsigned int ring_size)
259 260 {
260   - /* Ensure build-time power-of-2. */
261   - BUILD_BUG_ON(ring_size & (ring_size - 1));
  261 + BUILD_BUG_ON(!is_power_of_2(ring_size));
262 262  
263 263 return (dr->pending -
264 264 ((dr->prod - dr->cons) & (ring_size - 1)));