[PATCH v2 16/16] build_bug.h; Remove __BUILD_BUG_ON_NOT_POWER_OF_2()

david.laight.linux@gmail.com posted 16 patches 1 day, 11 hours ago
[PATCH v2 16/16] build_bug.h; Remove __BUILD_BUG_ON_NOT_POWER_OF_2()
Posted by david.laight.linux@gmail.com 1 day, 11 hours ago
From: David Laight <david.laight.linux@gmail.com>

It was added for, and only used by, bitfield.h.
That not longer uses it so it can be removed.

It should have been called BUILD_BUG_ON_NOT_ZERO_OR_POWER_OF_2()
but there is no real need for such a specialised function.

Signed-off-by: David Laight <david.laight.linux@gmail.com>
---
 include/linux/build_bug.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/linux/build_bug.h b/include/linux/build_bug.h
index 2cfbb4c65c78..0ca6cb79f704 100644
--- a/include/linux/build_bug.h
+++ b/include/linux/build_bug.h
@@ -17,8 +17,6 @@
 	__BUILD_BUG_ON_ZERO_MSG(e, ##__VA_ARGS__, #e " is true")
 
 /* Force a compilation error if a constant expression is not a power of 2 */
-#define __BUILD_BUG_ON_NOT_POWER_OF_2(n)	\
-	BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
 #define BUILD_BUG_ON_NOT_POWER_OF_2(n)			\
 	BUILD_BUG_ON((n) == 0 || (((n) & ((n) - 1)) != 0))
 
-- 
2.39.5