* [B.A.T.M.A.N.] [PATCHv2] batman-adv: Remove unused primary_if and bat_priv variables
@ 2016-06-14 20:56 Linus Lüssing
2016-06-16 19:49 ` Sven Eckelmann
0 siblings, 1 reply; 3+ messages in thread
From: Linus Lüssing @ 2016-06-14 20:56 UTC (permalink / raw)
To: b.a.t.m.a.n
Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
Fixes: 29b9256e6631 ("batman-adv: consider outgoing interface in OGM sending")
Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
---
v2:
* Remove now unused bat_priv variable, too
net/batman-adv/bat_iv_ogm.c | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index 19b0abd..6af4462 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -528,36 +528,25 @@ static void batadv_iv_ogm_send_to_if(struct batadv_forw_packet *forw_packet,
static void batadv_iv_ogm_emit(struct batadv_forw_packet *forw_packet)
{
struct net_device *soft_iface;
- struct batadv_priv *bat_priv;
- struct batadv_hard_iface *primary_if = NULL;
if (!forw_packet->if_incoming) {
pr_err("Error - can't forward packet: incoming iface not specified\n");
- goto out;
+ return;
}
soft_iface = forw_packet->if_incoming->soft_iface;
- bat_priv = netdev_priv(soft_iface);
if (WARN_ON(!forw_packet->if_outgoing))
- goto out;
+ return;
if (WARN_ON(forw_packet->if_outgoing->soft_iface != soft_iface))
- goto out;
+ return;
if (forw_packet->if_incoming->if_status != BATADV_IF_ACTIVE)
- goto out;
-
- primary_if = batadv_primary_if_get_selected(bat_priv);
- if (!primary_if)
- goto out;
+ return;
/* only for one specific outgoing interface */
batadv_iv_ogm_send_to_if(forw_packet, forw_packet->if_outgoing);
-
-out:
- if (primary_if)
- batadv_hardif_put(primary_if);
}
/**
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCHv2] batman-adv: Remove unused primary_if and bat_priv variables
2016-06-14 20:56 [B.A.T.M.A.N.] [PATCHv2] batman-adv: Remove unused primary_if and bat_priv variables Linus Lüssing
@ 2016-06-16 19:49 ` Sven Eckelmann
2016-06-20 8:59 ` Marek Lindner
0 siblings, 1 reply; 3+ messages in thread
From: Sven Eckelmann @ 2016-06-16 19:49 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 1827 bytes --]
On Tuesday 14 June 2016 22:56:50 Linus Lüssing wrote:
> Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
> Fixes: 29b9256e6631 ("batman-adv: consider outgoing interface in OGM
> sending") Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
> ---
Reviewed-by: Sven Eckelmann <sven@narfation.org>
> v2:
> * Remove now unused bat_priv variable, too
>
> net/batman-adv/bat_iv_ogm.c | 19 ++++---------------
> 1 file changed, 4 insertions(+), 15 deletions(-)
>
> diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
> index 19b0abd..6af4462 100644
> --- a/net/batman-adv/bat_iv_ogm.c
> +++ b/net/batman-adv/bat_iv_ogm.c
> @@ -528,36 +528,25 @@ static void batadv_iv_ogm_send_to_if(struct
> batadv_forw_packet *forw_packet, static void batadv_iv_ogm_emit(struct
> batadv_forw_packet *forw_packet) {
> struct net_device *soft_iface;
> - struct batadv_priv *bat_priv;
> - struct batadv_hard_iface *primary_if = NULL;
>
> if (!forw_packet->if_incoming) {
> pr_err("Error - can't forward packet: incoming iface not specified\n");
> - goto out;
> + return;
> }
>
> soft_iface = forw_packet->if_incoming->soft_iface;
> - bat_priv = netdev_priv(soft_iface);
>
> if (WARN_ON(!forw_packet->if_outgoing))
> - goto out;
> + return;
>
> if (WARN_ON(forw_packet->if_outgoing->soft_iface != soft_iface))
> - goto out;
> + return;
>
> if (forw_packet->if_incoming->if_status != BATADV_IF_ACTIVE)
> - goto out;
> -
> - primary_if = batadv_primary_if_get_selected(bat_priv);
> - if (!primary_if)
> - goto out;
> + return;
>
> /* only for one specific outgoing interface */
> batadv_iv_ogm_send_to_if(forw_packet, forw_packet->if_outgoing);
> -
> -out:
> - if (primary_if)
> - batadv_hardif_put(primary_if);
> }
>
> /**
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCHv2] batman-adv: Remove unused primary_if and bat_priv variables
2016-06-16 19:49 ` Sven Eckelmann
@ 2016-06-20 8:59 ` Marek Lindner
0 siblings, 0 replies; 3+ messages in thread
From: Marek Lindner @ 2016-06-20 8:59 UTC (permalink / raw)
To: b.a.t.m.a.n
[-- Attachment #1: Type: text/plain, Size: 432 bytes --]
On Thursday, June 16, 2016 21:49:15 Sven Eckelmann wrote:
> On Tuesday 14 June 2016 22:56:50 Linus Lüssing wrote:
> > Acked-by: Simon Wunderlich <sw@simonwunderlich.de>
> > Fixes: 29b9256e6631 ("batman-adv: consider outgoing interface in OGM
> > sending") Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
> > ---
>
> Reviewed-by: Sven Eckelmann <sven@narfation.org>
Applied in revision 7395e64.
Thanks,
Marek
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-20 8:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-14 20:56 [B.A.T.M.A.N.] [PATCHv2] batman-adv: Remove unused primary_if and bat_priv variables Linus Lüssing
2016-06-16 19:49 ` Sven Eckelmann
2016-06-20 8:59 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).