b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] [PATCHv2] batman-adv: Remove unused primary_if and bat_priv variables
Date: Thu, 16 Jun 2016 21:49:15 +0200	[thread overview]
Message-ID: <2601328.mlZH1BliTQ@sven-edge> (raw)
In-Reply-To: <1465937810-17394-1-git-send-email-linus.luessing@c0d3.blue>

[-- 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 --]

  reply	other threads:[~2016-06-16 19:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2016-06-20  8:59   ` 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=2601328.mlZH1BliTQ@sven-edge \
    --to=sven@narfation.org \
    --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;
as well as URLs for NNTP newsgroup(s).