Sparse gives the following warnings when compile against Linux kernel
3.5:
CHECK /root/projs/ovs/openvswitch/datapath/linux/skbuff-openvswitch.c
include/linux/mm.h:405:9: error: undefined identifier
'BUILD_BUG_ON_INVALID'
include/linux/mm.h:405:9: error: not a function <noident>
The same issue may also exist in kernel 3.6.
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
--- /dev/null
+#ifndef __LINUX_BUG_WRAPPER_H
+#define __LINUX_BUG_WRAPPER_H 1
+
+#include_next <linux/bug.h>
+
+#ifdef __CHECKER__
+#ifndef BUILD_BUG_ON_INVALID
+#define BUILD_BUG_ON_INVALID(e) (0)
+#endif
+
+#endif /* __CHECKER__ */
+
+#endif