From: Robert P. J. Day Date: Wed, 7 Nov 2007 10:24:33 +0000 (-0800) Subject: [SPARC64]: Use "is_power_of_2" macro for simplicity. X-Git-Tag: v2.6.24-rc3~178^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f78a19702574008bbd333237380fa85be1c9e5d;p=linux-2.6 [SPARC64]: Use "is_power_of_2" macro for simplicity. Signed-off-by: Robert P. J. Day Signed-off-by: David S. Miller --- diff --git a/include/asm-sparc64/vio.h b/include/asm-sparc64/vio.h index f7417e91b1..d4de32f0f8 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)));