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 1/4] batman-adv: fix multiline comment
@ 2013-11-22 12:30 Simon Wunderlich
  2013-11-22 12:30 ` [B.A.T.M.A.N.] [PATCH 2/4] batman-adv: silence uninitialized variable warning Simon Wunderlich
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Simon Wunderlich @ 2013-11-22 12:30 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Simon Wunderlich

From: Simon Wunderlich <simon@open-mesh.com>

This problem was introduced by commit
9bb33b8d88e318c4879d37d06ad28e3e018b9036
("batman-adv: split tq information in neigh_node struct")

Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
---
 main.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/main.h b/main.h
index 09cdebb..d154d4d 100644
--- a/main.h
+++ b/main.h
@@ -71,7 +71,8 @@
 
 /* default interface for multi interface operation. The default interface is
  * used for communication which originated locally (i.e. is not forwarded)
- * or where special forwarding is not desired/necessary. */
+ * or where special forwarding is not desired/necessary.
+ */
 #define BATADV_IF_DEFAULT	((struct batadv_hard_iface *)NULL)
 
 #define BATADV_NUM_WORDS BITS_TO_LONGS(BATADV_TQ_LOCAL_WINDOW_SIZE)
-- 
1.7.10.4


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

* [B.A.T.M.A.N.] [PATCH 2/4] batman-adv: silence uninitialized variable warning
  2013-11-22 12:30 [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: fix multiline comment Simon Wunderlich
@ 2013-11-22 12:30 ` Simon Wunderlich
  2013-11-22 17:28   ` Marek Lindner
  2013-11-22 12:30 ` [B.A.T.M.A.N.] [PATCH 3/4] batman-adv: fix sparse warning in batadv_iv_ogm_emit Simon Wunderlich
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Simon Wunderlich @ 2013-11-22 12:30 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Simon Wunderlich

From: Simon Wunderlich <simon@open-mesh.com>

sparse (at least the version of the build checker) is complaining about:

routing.c: In function 'batadv_find_router':
routing.c:431:28: warning: 'next_candidate_router' may be used
uninitialized in this function [-Wmaybe-uninitialized]

Although this is bogus, silencing is not expensive and is done by this
patch.

Introduced by 797edd9e87ac838711e03498a4ae795b600191af
("batman-adv: add bonding again")

Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
---
 routing.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/routing.c b/routing.c
index 69620e0..23311f5 100644
--- a/routing.c
+++ b/routing.c
@@ -428,7 +428,7 @@ batadv_find_router(struct batadv_priv *bat_priv,
 {
 	struct batadv_algo_ops *bao = bat_priv->bat_algo_ops;
 	struct batadv_neigh_node *first_candidate_router = NULL;
-	struct batadv_neigh_node *next_candidate_router;
+	struct batadv_neigh_node *next_candidate_router = NULL;
 	struct batadv_neigh_node *router, *cand_router = NULL;
 	struct batadv_orig_ifinfo *cand, *first_candidate = NULL;
 	struct batadv_orig_ifinfo *next_candidate = NULL;
-- 
1.7.10.4


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

* [B.A.T.M.A.N.] [PATCH 3/4] batman-adv: fix sparse warning in batadv_iv_ogm_emit
  2013-11-22 12:30 [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: fix multiline comment Simon Wunderlich
  2013-11-22 12:30 ` [B.A.T.M.A.N.] [PATCH 2/4] batman-adv: silence uninitialized variable warning Simon Wunderlich
@ 2013-11-22 12:30 ` Simon Wunderlich
  2013-11-22 17:29   ` Marek Lindner
  2013-11-22 12:30 ` [B.A.T.M.A.N.] [PATCH 4/4] batman-adv: fix sparse warning in batadv_iv_ogm_process_per_outif Simon Wunderlich
  2013-11-22 17:27 ` [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: fix multiline comment Marek Lindner
  3 siblings, 1 reply; 8+ messages in thread
From: Simon Wunderlich @ 2013-11-22 12:30 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Simon Wunderlich

From: Simon Wunderlich <simon@open-mesh.com>

The directlink variable is not needed anymore, and sparse complains
about that. Remove it.

Removal was introduced in 29b9256e6631876d4f1719f4d5e13d7ee140c61b
("batman-adv: consider outgoing interface in OGM sending")

Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
---
 bat_iv_ogm.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/bat_iv_ogm.c b/bat_iv_ogm.c
index dbd55f0..2a36de8 100644
--- a/bat_iv_ogm.c
+++ b/bat_iv_ogm.c
@@ -467,12 +467,10 @@ static void batadv_iv_ogm_emit(struct batadv_forw_packet *forw_packet)
 	struct batadv_priv *bat_priv;
 	struct batadv_hard_iface *primary_if = NULL;
 	struct batadv_ogm_packet *batadv_ogm_packet;
-	unsigned char directlink;
 	uint8_t *packet_pos;
 
 	packet_pos = forw_packet->skb->data;
 	batadv_ogm_packet = (struct batadv_ogm_packet *)packet_pos;
-	directlink = (batadv_ogm_packet->flags & BATADV_DIRECTLINK ? 1 : 0);
 
 	if (!forw_packet->if_incoming) {
 		pr_err("Error - can't forward packet: incoming iface not specified\n");
-- 
1.7.10.4


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

* [B.A.T.M.A.N.] [PATCH 4/4] batman-adv: fix sparse warning in batadv_iv_ogm_process_per_outif
  2013-11-22 12:30 [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: fix multiline comment Simon Wunderlich
  2013-11-22 12:30 ` [B.A.T.M.A.N.] [PATCH 2/4] batman-adv: silence uninitialized variable warning Simon Wunderlich
  2013-11-22 12:30 ` [B.A.T.M.A.N.] [PATCH 3/4] batman-adv: fix sparse warning in batadv_iv_ogm_emit Simon Wunderlich
@ 2013-11-22 12:30 ` Simon Wunderlich
  2013-11-22 17:30   ` Marek Lindner
  2013-11-22 17:27 ` [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: fix multiline comment Marek Lindner
  3 siblings, 1 reply; 8+ messages in thread
From: Simon Wunderlich @ 2013-11-22 12:30 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Simon Wunderlich

From: Simon Wunderlich <simon@open-mesh.com>

The orig_node_tmp variable is not needed anymore, and spare complains
about that. Remove it.

This variable was used for line length reasons and usage was removed
in de6bcc76ea84fecb136f8c8f5ba1862e4a13f06b ("batman-adv: split out
router from orig_node")

Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
---
 bat_iv_ogm.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/bat_iv_ogm.c b/bat_iv_ogm.c
index 2a36de8..939d16e 100644
--- a/bat_iv_ogm.c
+++ b/bat_iv_ogm.c
@@ -1368,7 +1368,7 @@ batadv_iv_ogm_process_per_outif(const struct sk_buff *skb, int ogm_offset,
 {
 	struct batadv_priv *bat_priv = netdev_priv(if_incoming->soft_iface);
 	struct batadv_neigh_node *router = NULL, *router_router = NULL;
-	struct batadv_orig_node *orig_neigh_node, *orig_node_tmp;
+	struct batadv_orig_node *orig_neigh_node;
 	struct batadv_orig_ifinfo *orig_ifinfo;
 	struct batadv_neigh_node *orig_neigh_router = NULL;
 	struct batadv_neigh_ifinfo *router_ifinfo = NULL;
@@ -1412,7 +1412,6 @@ batadv_iv_ogm_process_per_outif(const struct sk_buff *skb, int ogm_offset,
 
 	router = batadv_orig_router_get(orig_node, if_outgoing);
 	if (router) {
-		orig_node_tmp = router->orig_node;
 		router_router = batadv_orig_router_get(router->orig_node,
 						       if_outgoing);
 		router_ifinfo = batadv_neigh_ifinfo_get(router, if_outgoing);
-- 
1.7.10.4


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

* Re: [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: fix multiline comment
  2013-11-22 12:30 [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: fix multiline comment Simon Wunderlich
                   ` (2 preceding siblings ...)
  2013-11-22 12:30 ` [B.A.T.M.A.N.] [PATCH 4/4] batman-adv: fix sparse warning in batadv_iv_ogm_process_per_outif Simon Wunderlich
@ 2013-11-22 17:27 ` Marek Lindner
  3 siblings, 0 replies; 8+ messages in thread
From: Marek Lindner @ 2013-11-22 17:27 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Simon Wunderlich

[-- Attachment #1: Type: text/plain, Size: 434 bytes --]

On Friday 22 November 2013 13:30:24 Simon Wunderlich wrote:
> From: Simon Wunderlich <simon@open-mesh.com>
> 
> This problem was introduced by commit
> 9bb33b8d88e318c4879d37d06ad28e3e018b9036
> ("batman-adv: split tq information in neigh_node struct")
> 
> Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
> ---
>  main.h |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Applied in revision 4812dfd.

Thanks,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: [B.A.T.M.A.N.] [PATCH 2/4] batman-adv: silence uninitialized variable warning
  2013-11-22 12:30 ` [B.A.T.M.A.N.] [PATCH 2/4] batman-adv: silence uninitialized variable warning Simon Wunderlich
@ 2013-11-22 17:28   ` Marek Lindner
  0 siblings, 0 replies; 8+ messages in thread
From: Marek Lindner @ 2013-11-22 17:28 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Simon Wunderlich

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

On Friday 22 November 2013 13:30:25 Simon Wunderlich wrote:
> From: Simon Wunderlich <simon@open-mesh.com>
> 
> sparse (at least the version of the build checker) is complaining about:
> 
> routing.c: In function 'batadv_find_router':
> routing.c:431:28: warning: 'next_candidate_router' may be used
> uninitialized in this function [-Wmaybe-uninitialized]
> 
> Although this is bogus, silencing is not expensive and is done by this
> patch.
> 
> Introduced by 797edd9e87ac838711e03498a4ae795b600191af
> ("batman-adv: add bonding again")
> 
> Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
> ---
>  routing.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied in revision aed390d.

Thanks,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: [B.A.T.M.A.N.] [PATCH 3/4] batman-adv: fix sparse warning in batadv_iv_ogm_emit
  2013-11-22 12:30 ` [B.A.T.M.A.N.] [PATCH 3/4] batman-adv: fix sparse warning in batadv_iv_ogm_emit Simon Wunderlich
@ 2013-11-22 17:29   ` Marek Lindner
  0 siblings, 0 replies; 8+ messages in thread
From: Marek Lindner @ 2013-11-22 17:29 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Simon Wunderlich

[-- Attachment #1: Type: text/plain, Size: 508 bytes --]

On Friday 22 November 2013 13:30:26 Simon Wunderlich wrote:
> From: Simon Wunderlich <simon@open-mesh.com>
> 
> The directlink variable is not needed anymore, and sparse complains
> about that. Remove it.
> 
> Removal was introduced in 29b9256e6631876d4f1719f4d5e13d7ee140c61b
> ("batman-adv: consider outgoing interface in OGM sending")
> 
> Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
> ---
>  bat_iv_ogm.c |    2 --
>  1 file changed, 2 deletions(-)

Applied in revision a0fc2f1.

Thanks,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: [B.A.T.M.A.N.] [PATCH 4/4] batman-adv: fix sparse warning in batadv_iv_ogm_process_per_outif
  2013-11-22 12:30 ` [B.A.T.M.A.N.] [PATCH 4/4] batman-adv: fix sparse warning in batadv_iv_ogm_process_per_outif Simon Wunderlich
@ 2013-11-22 17:30   ` Marek Lindner
  0 siblings, 0 replies; 8+ messages in thread
From: Marek Lindner @ 2013-11-22 17:30 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Simon Wunderlich

[-- Attachment #1: Type: text/plain, Size: 564 bytes --]

On Friday 22 November 2013 13:30:27 Simon Wunderlich wrote:
> From: Simon Wunderlich <simon@open-mesh.com>
> 
> The orig_node_tmp variable is not needed anymore, and spare complains
> about that. Remove it.
> 
> This variable was used for line length reasons and usage was removed
> in de6bcc76ea84fecb136f8c8f5ba1862e4a13f06b ("batman-adv: split out
> router from orig_node")
> 
> Signed-off-by: Simon Wunderlich <simon@open-mesh.com>
> ---
>  bat_iv_ogm.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Applied in revision 930c3b9.

Thanks,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

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

end of thread, other threads:[~2013-11-22 17:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-22 12:30 [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: fix multiline comment Simon Wunderlich
2013-11-22 12:30 ` [B.A.T.M.A.N.] [PATCH 2/4] batman-adv: silence uninitialized variable warning Simon Wunderlich
2013-11-22 17:28   ` Marek Lindner
2013-11-22 12:30 ` [B.A.T.M.A.N.] [PATCH 3/4] batman-adv: fix sparse warning in batadv_iv_ogm_emit Simon Wunderlich
2013-11-22 17:29   ` Marek Lindner
2013-11-22 12:30 ` [B.A.T.M.A.N.] [PATCH 4/4] batman-adv: fix sparse warning in batadv_iv_ogm_process_per_outif Simon Wunderlich
2013-11-22 17:30   ` Marek Lindner
2013-11-22 17:27 ` [B.A.T.M.A.N.] [PATCH 1/4] batman-adv: fix multiline comment Marek Lindner

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