batman-adv: fix multiline comment
PATCH 1/4 batman-adv: fix multiline comment
From: Simon Wunderlich <[email protected]>
This problem was introduced by commit 9bb33b8d88e318c4879d37d06ad28e3e018b9036 ("batman-adv: split tq information in neigh_node struct")
--- main.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
main.h +2 -1
@@ -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)
Signature · 1 line
1.7.10.4
PATCH 2/4 batman-adv: silence uninitialized variable warning
From: Simon Wunderlich <[email protected]>
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")
--- routing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
routing.c +1 -1
@@ -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 ;
Signature · 1 line
1.7.10.4
Marek Lindner
AppliedRe: [B.A.T.M.A.N.] [PATCH 2/4] batman-adv: silence uninitialized variable warning
Quoted 11 lines · On Friday 22 November 2013 13:30:25 Simon Wunderlich wrote:
From: Simon Wunderlich <[email protected]>
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.
Quoted 7 lines
Introduced by
797edd9e87ac838711e03498a4ae795b600191af("batman-adv: add bonding again")Signed-off-by Simon Wunderlich <[email protected]>--- routing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied in revision aed390d.
Thanks,
Marek
PATCH 3/4 batman-adv: fix sparse warning in batadv_iv_ogm_emit
In reply to Simon WunderlichFrom: Simon Wunderlich <[email protected]>
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")
--- bat_iv_ogm.c | 2 -- 1 file changed, 2 deletions(-)
bat_iv_ogm.c +0 -2
@@ -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" );
Signature · 1 line
1.7.10.4
Marek Lindner
AppliedRe: [B.A.T.M.A.N.] [PATCH 3/4] batman-adv: fix sparse warning in batadv_iv_ogm_emit
Quoted 5 lines · On Friday 22 November 2013 13:30:26 Simon Wunderlich wrote:
From: Simon Wunderlich <[email protected]>
The directlink variable is not needed anymore, and sparse complains about that. Remove it.
Quoted 7 lines
Removal was introduced in
29b9256e6631876d4f1719f4d5e13d7ee140c61b("batman-adv: consider outgoing interface in OGM sending")Signed-off-by Simon Wunderlich <[email protected]>--- bat_iv_ogm.c | 2 -- 1 file changed, 2 deletions(-)
Applied in revision a0fc2f1.
Thanks,
Marek
PATCH 4/4 batman-adv: fix sparse warning in batadv_iv_ogm_process_per_outif
In reply to Simon WunderlichFrom: Simon Wunderlich <[email protected]>
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")
--- bat_iv_ogm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
bat_iv_ogm.c +1 -2
@@ -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);
Signature · 1 line
1.7.10.4
Marek Lindner
AppliedRe: [B.A.T.M.A.N.] [PATCH 4/4] batman-adv: fix sparse warning in batadv_iv_ogm_process_per_outif
Quoted 5 lines · On Friday 22 November 2013 13:30:27 Simon Wunderlich wrote:
From: Simon Wunderlich <[email protected]>
The
orig_node_tmpvariable is not needed anymore, and spare complains about that. Remove it.
Quoted 8 lines
This variable was used for line length reasons and usage was removed in
de6bcc76ea84fecb136f8c8f5ba1862e4a13f06b("batman-adv: split out router fromorig_node")Signed-off-by Simon Wunderlich <[email protected]>--- bat_iv_ogm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Applied in revision 930c3b9.
Thanks,
Marek
Marek Lindner
AppliedQuoted 10 lines · On Friday 22 November 2013 13:30:24 Simon Wunderlich wrote:
From: Simon Wunderlich <[email protected]>
This problem was introduced by commit
9bb33b8d88e318c4879d37d06ad28e3e018b9036("batman-adv: split tq information inneigh_nodestruct")Signed-off-by Simon Wunderlich <[email protected]>--- main.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Applied in revision 4812dfd.
Thanks,
Marek