batman-adv: tp_meter: mark init function with __init
authorAntonio Quartulli <a@unstable.cc>
Wed, 7 Jun 2017 14:51:22 +0000 (22:51 +0800)
committerSimon Wunderlich <sw@simonwunderlich.de>
Fri, 9 Jun 2017 13:56:59 +0000 (15:56 +0200)
batadv_tp_meter_init() is invoked in batadv_init() only
which is marked with __init.

For this reason batadv_tp_meter_init() can be marked with
__init as well and dropped after module load.

Signed-off-by: Antonio Quartulli <a@unstable.cc>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/tp_meter.c

index 556f9a865ddfb5e488c65e9edd708fad187f56b1..e3e2585d097766a4128ee32b82ab0700a9c6f49c 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/etherdevice.h>
 #include <linux/fs.h>
 #include <linux/if_ether.h>
+#include <linux/init.h>
 #include <linux/jiffies.h>
 #include <linux/kernel.h>
 #include <linux/kref.h>
@@ -1497,7 +1498,7 @@ void batadv_tp_meter_recv(struct batadv_priv *bat_priv, struct sk_buff *skb)
 /**
  * batadv_tp_meter_init - initialize global tp_meter structures
  */
-void batadv_tp_meter_init(void)
+void __init batadv_tp_meter_init(void)
 {
        get_random_bytes(batadv_tp_prerandom, sizeof(batadv_tp_prerandom));
 }