public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH next] batman-adv: make gw_init() return void
@ 2013-09-22 18:02 Antonio Quartulli
  2013-09-24 12:36 ` Marek Lindner
  0 siblings, 1 reply; 2+ messages in thread
From: Antonio Quartulli @ 2013-09-22 18:02 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Antonio Quartulli

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>
---
 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 07fd877..ab9a5ac 100644
--- a/gateway_common.c
+++ b/gateway_common.c
@@ -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;
 }
 
 /**
diff --git a/gateway_common.h b/gateway_common.h
index f18e8b7..368d50e 100644
--- a/gateway_common.h
+++ b/gateway_common.h
@@ -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_ */
diff --git a/main.c b/main.c
index 5ee2abb..21c6a01 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);
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH next] batman-adv: make gw_init() return void
  2013-09-22 18:02 [B.A.T.M.A.N.] [PATCH next] batman-adv: make gw_init() return void Antonio Quartulli
@ 2013-09-24 12:36 ` Marek Lindner
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2013-09-24 12:36 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Antonio Quartulli

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")
> 
> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
> ---
>  gateway_common.c | 5 +----
>  gateway_common.h | 2 +-
>  main.c           | 4 +---
>  3 files changed, 3 insertions(+), 8 deletions(-)

Applied in revision b34050b.

Thanks,
Marek


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-24 12:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-22 18:02 [B.A.T.M.A.N.] [PATCH next] batman-adv: make gw_init() return void Antonio Quartulli
2013-09-24 12:36 ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox