On Mittwoch, 14. Dezember 2016 19:48:19 CET Sven Eckelmann wrote:
On Donnerstag, 6. Oktober 2016 08:41:38 CET Linus Lüssing wrote:
hlist_add_behind_rcu(&hardif_neigh->list, &pre_neigh->list);
Compat code is missing for this function
ecsv/pu: sparse linux-3.16 cfg: BLA=n DAT=n DEBUGFS=y DEBUG=y NC=n MCAST=n BATMAN_V=y
/home/build_test/build_env/tmp.YwQkM10Q6k/build/net/batman-adv/bat_v_elp.c:96:9: warning: Variable length array is used. /home/build_test/build_env/tmp.YwQkM10Q6k/build/net/batman-adv/originator.c:594:17: error: undefined identifier 'hlist_add_behind_rcu' /home/build_test/build_env/tmp.YwQkM10Q6k/build/net/batman-adv/originator.c: In function 'batadv_hardif_neigh_create': /home/build_test/build_env/tmp.YwQkM10Q6k/build/net/batman-adv/originator.c:594:3: error: implicit declaration of function 'hlist_add_behind_rcu' [-Werror=implicit-function-declaration] hlist_add_behind_rcu(&hardif_neigh->list, &pre_neigh->list);
I have now added the compat code together with some include fixes to ecsv/pu
diff --git a/compat-include/linux/rculist.h b/compat-include/linux/rculist.h index d432bc65..3c7ae76b 100644 --- a/compat-include/linux/rculist.h +++ b/compat-include/linux/rculist.h @@ -36,4 +36,10 @@
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) + +#define hlist_add_behind_rcu(n, prev) hlist_add_after_rcu(prev, n) + +#endif /* < KERNEL_VERSION(3, 17, 0) */ + #endif /* _NET_BATMAN_ADV_COMPAT_LINUX_RCULIST_H_ */ diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c index 712bd428..a69614f5 100644 --- a/net/batman-adv/bat_v_elp.c +++ b/net/batman-adv/bat_v_elp.c @@ -19,10 +19,10 @@ #include "main.h"
#include <crypto/hash.h> -#include <crypto/sha.h> #include <linux/atomic.h> +#include <linux/bug.h> #include <linux/byteorder/generic.h> -#include <linux/err.h> +#include <linux/device.h> #include <linux/errno.h> #include <linux/etherdevice.h> #include <linux/ethtool.h>
Kind regards, Sven