From 6e5877ecdacf66905afd2481d0025d3fd7d9132f Mon Sep 17 00:00:00 2001 From: Pravin B Shelar Date: Mon, 5 Nov 2012 15:12:59 -0800 Subject: [PATCH] datapath: Add missing bug.h file Commit 51f4701be1 (datapath: Fix sparse warning for symbol 'BUILD_BUG_ON_NOT_POWER_OF_2') missed file bug.h. Commiting it now. Signed-off-by: Pravin B Shelar --- datapath/linux/compat/include/linux/bug.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 datapath/linux/compat/include/linux/bug.h diff --git a/datapath/linux/compat/include/linux/bug.h b/datapath/linux/compat/include/linux/bug.h new file mode 100644 index 00000000..d24e68e3 --- /dev/null +++ b/datapath/linux/compat/include/linux/bug.h @@ -0,0 +1,12 @@ +#ifndef __BUG_H_WRAPPER +#define __BUG_H_WRAPPER 1 + +#include_next + +#ifndef BUILD_BUG_ON_NOT_POWER_OF_2 +/* 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) == 0 || (((n) & ((n) - 1)) != 0)) +#endif + +#endif -- 2.30.2