Skip to contentSkip to conversation

batman-adv: make gw_init() return void

PATCH Applied Antonio Quartulli 2 participants 2 messages Sep 22, 2013 – Sep 24, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")

---
 gateway_common.c | 5 +----
 gateway_common.h | 2 +-
 main.c           | 4 +---
 3 files changed, 3 insertions(+), 8 deletions(-)
gateway_common.c +1 -4
index 07fd877..ab9a5ac 100644
@@ -223,15 +223,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;
 }
 
 /**
gateway_common.h +1 -1
index f18e8b7..368d50e 100644
@@ -43,7 +43,7 @@ enum batadv_bandwidth_types {
 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_ */
main.c +1 -3
index 5ee2abb..21c6a01 100644
@@ -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);
Signature · 1 line
1.8.1.5
#1 lore raw
Quoted 7 lines · On Sunday 22 September 2013 20:02:22 Antonio Quartulli wrote:

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")

Quoted 6 lines
---
 gateway_common.c | 5 +----
 gateway_common.h | 2 +-
 main.c           | 4 +---
 3 files changed, 3 insertions(+), 8 deletions(-)

Applied in revision b34050b.

Thanks,
Marek