tp_meter: mark init function with __init

Message ID 20170607145122.18207-1-a@unstable.cc (mailing list archive)
State Accepted, archived
Commit 412f93cbbfa81e31773a513604eb3c7ff5ec814d
Delegated to: Simon Wunderlich
Headers

Commit Message

Antonio Quartulli June 7, 2017, 2:51 p.m. UTC
  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>
---
 net/batman-adv/tp_meter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Sven Eckelmann June 9, 2017, 7:09 a.m. UTC | #1
On Mittwoch, 7. Juni 2017 22:51:22 CEST Antonio Quartulli wrote:
> 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>
> ---
>  net/batman-adv/tp_meter.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

I've added the "batman-adv: " prefix and applied it in 412f93cbbfa8 [1].

Kind regards,
	Sven

[1] https://git.open-mesh.org/batman-adv.git/commit/412f93cbbfa81e31773a513604eb3c7ff5ec814d
  

Patch

diff --git a/net/batman-adv/tp_meter.c b/net/batman-adv/tp_meter.c
index 556f9a86..0334c56d 100644
--- a/net/batman-adv/tp_meter.c
+++ b/net/batman-adv/tp_meter.c
@@ -1497,7 +1497,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));
 }