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-Url: https://git.stricted.de/?a=commitdiff_plain;h=6f78a19702574008bbd333237380fa85be1c9e5d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [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 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)));