Repository : ssh://git@open-mesh.org/openwrt-feed-devel
On branch : master
commit 8e2478f086c9fab7f7134f304858408c0c8822e4 Author: Sven Eckelmann sven@narfation.org Date: Tue Feb 27 13:59:03 2018 +0100
batman-adv-devel: upgrade compat-hacks for release 2018.0
Signed-off-by: Sven Eckelmann sven@narfation.org
8e2478f086c9fab7f7134f304858408c0c8822e4 batman-adv-devel/files/compat-hacks.h | 16 +++++++++--- batman-adv-devel/patches/0001-compat-hacks.patch | 33 ++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 3 deletions(-)
diff --git a/batman-adv-devel/files/compat-hacks.h b/batman-adv-devel/files/compat-hacks.h index a27408d..d7f30ad 100644 --- a/batman-adv-devel/files/compat-hacks.h +++ b/batman-adv-devel/files/compat-hacks.h @@ -334,6 +334,16 @@ static inline void timer_setup(struct timer_list *timer,
#endif /* !from_timer */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 16, 0) + +#ifdef __CHECK_POLL +typedef unsigned __bitwise __poll_t; +#else +typedef unsigned __poll_t; +#endif + +#endif /* < KERNEL_VERSION(4, 16, 0) */ + /* <DECLARE_EWMA> */
#include <linux/version.h> @@ -392,7 +402,7 @@ static inline void timer_setup(struct timer_list *timer, static inline void ewma_##name##_add(struct ewma_##name *e, \ unsigned long val) \ { \ - unsigned long internal = ACCESS_ONCE(e->internal); \ + unsigned long internal = READ_ONCE(e->internal); \ unsigned long weight_rcp = ilog2(_weight_rcp); \ unsigned long precision = _precision; \ \ @@ -401,10 +411,10 @@ static inline void timer_setup(struct timer_list *timer, BUILD_BUG_ON((_precision) > 30); \ BUILD_BUG_ON_NOT_POWER_OF_2(_weight_rcp); \ \ - ACCESS_ONCE(e->internal) = internal ? \ + WRITE_ONCE(e->internal, internal ? \ (((internal << weight_rcp) - internal) + \ (val << precision)) >> weight_rcp : \ - (val << precision); \ + (val << precision)); \ }
/* </DECLARE_EWMA> */ diff --git a/batman-adv-devel/patches/0001-compat-hacks.patch b/batman-adv-devel/patches/0001-compat-hacks.patch new file mode 100644 index 0000000..0a9994d --- /dev/null +++ b/batman-adv-devel/patches/0001-compat-hacks.patch @@ -0,0 +1,33 @@ +--- a/net/batman-adv/main.c ++++ b/net/batman-adv/main.c +@@ -19,7 +19,7 @@ + #include "main.h" + + #include <linux/atomic.h> +-#include <linux/build_bug.h> ++#include <linux/bug.h> + #include <linux/byteorder/generic.h> + #include <linux/crc32c.h> + #include <linux/errno.h> +--- a/net/batman-adv/tp_meter.c ++++ b/net/batman-adv/tp_meter.c +@@ -20,7 +20,7 @@ + #include "main.h" + + #include <linux/atomic.h> +-#include <linux/build_bug.h> ++#include <linux/bug.h> + #include <linux/byteorder/generic.h> + #include <linux/cache.h> + #include <linux/compiler.h> +--- a/net/batman-adv/translation-table.c ++++ b/net/batman-adv/translation-table.c +@@ -21,7 +21,7 @@ + + #include <linux/atomic.h> + #include <linux/bitops.h> +-#include <linux/build_bug.h> ++#include <linux/bug.h> + #include <linux/byteorder/generic.h> + #include <linux/cache.h> + #include <linux/compiler.h>