public inbox for b.a.t.m.a.n@lists.open-mesh.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <antonio@meshcoding.com>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Antonio Quartulli <antonio@meshcoding.com>
Subject: [B.A.T.M.A.N.] [PATCH next] batman-adv: make gw_init() return void
Date: Sun, 22 Sep 2013 20:02:22 +0200	[thread overview]
Message-ID: <1379872942-2803-1-git-send-email-antonio@meshcoding.com> (raw)

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


             reply	other threads:[~2013-09-22 18:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-22 18:02 Antonio Quartulli [this message]
2013-09-24 12:36 ` [B.A.T.M.A.N.] [PATCH next] batman-adv: make gw_init() return void Marek Lindner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1379872942-2803-1-git-send-email-antonio@meshcoding.com \
    --to=antonio@meshcoding.com \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox