From 6f78a19702574008bbd333237380fa85be1c9e5d Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Wed, 7 Nov 2007 02:24:33 -0800 Subject: [SPARC64]: Use "is_power_of_2" macro for simplicity. Signed-off-by: Robert P. J. Day Signed-off-by: David S. Miller --- include/asm-sparc64/vio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/asm-sparc64') diff --git a/include/asm-sparc64/vio.h b/include/asm-sparc64/vio.h index f7417e91b170..d4de32f0f8af 100644 --- a/include/asm-sparc64/vio.h +++ b/include/asm-sparc64/vio.h @@ -8,6 +8,7 @@ #include #include #include +#include #include #include @@ -257,8 +258,7 @@ static inline void *vio_dring_entry(struct vio_dring_state *dr, static inline u32 vio_dring_avail(struct vio_dring_state *dr, unsigned int ring_size) { - /* Ensure build-time power-of-2. */ - BUILD_BUG_ON(ring_size & (ring_size - 1)); + BUILD_BUG_ON(!is_power_of_2(ring_size)); return (dr->pending - ((dr->prod - dr->cons) & (ring_size - 1))); -- cgit v1.2.3