Repository : ssh://git@open-mesh.org/batman-adv
On branch : next
commit b34050b2ff060179d0a7ad5a094a978fbb049fcc Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Sep 22 20:02:22 2013 +0200
batman-adv: make gw_init() return void
gw_init does not return anything other than 0 (despite the kernel doc says something different..). Change it to void and fix the kernel doc.
Introduced-by 0853ec7fafe0a195754454832993c6b35e22b842 ("batman-adv: tvlv - gateway download/upload bandwidth container")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
b34050b2ff060179d0a7ad5a094a978fbb049fcc gateway_common.c | 5 +---- gateway_common.h | 2 +- main.c | 4 +--- 3 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/gateway_common.c b/gateway_common.c index 658ac0e..b211b0f 100644 --- a/gateway_common.c +++ b/gateway_common.c @@ -224,15 +224,12 @@ static void batadv_gw_tvlv_ogm_handler_v1(struct batadv_priv *bat_priv, /** * batadv_gw_init - initialise the gateway handling internals * @bat_priv: the bat priv with all the soft interface information - * - * Return 0 on success or negative error number in case of failure. */ -int batadv_gw_init(struct batadv_priv *bat_priv) +void batadv_gw_init(struct batadv_priv *bat_priv) { batadv_tvlv_handler_register(bat_priv, batadv_gw_tvlv_ogm_handler_v1, NULL, BATADV_TVLV_GW, 1, BATADV_TVLV_HANDLER_OGM_CIFNOTFND); - return 0; }
/** diff --git a/gateway_common.h b/gateway_common.h index dfc734d..56384a4 100644 --- a/gateway_common.h +++ b/gateway_common.h @@ -43,7 +43,7 @@ enum batadv_bandwidth_units { ssize_t batadv_gw_bandwidth_set(struct net_device *net_dev, char *buff, size_t count); void batadv_gw_tvlv_container_update(struct batadv_priv *bat_priv); -int batadv_gw_init(struct batadv_priv *bat_priv); +void batadv_gw_init(struct batadv_priv *bat_priv); void batadv_gw_free(struct batadv_priv *bat_priv);
#endif /* _NET_BATMAN_ADV_GATEWAY_COMMON_H_ */ diff --git a/main.c b/main.c index 5c5e64b..3231929 100644 --- a/main.c +++ b/main.c @@ -145,9 +145,7 @@ int batadv_mesh_init(struct net_device *soft_iface) if (ret < 0) goto err;
- ret = batadv_gw_init(bat_priv); - if (ret < 0) - goto err; + batadv_gw_init(bat_priv);
atomic_set(&bat_priv->gw.reselect, 0); atomic_set(&bat_priv->mesh_state, BATADV_MESH_ACTIVE);