Ethernet Bridge development
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Cc: Tom Gundersen <teg@jklm.no>, netdev <netdev@vger.kernel.org>,
	bridge <bridge@lists.linux-foundation.org>,
	"David S. Miller" <davem@davemloft.net>,
	"C. R. Oldham" <cr@saltstack.com>
Subject: Re: [Bridge] [PATCH net] bridge: Handle IFLA_ADDRESS correctly when creating bridge device
Date: Thu, 24 Apr 2014 11:38:27 -0700	[thread overview]
Message-ID: <20140424113827.6d27ec5b@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <1398341787.4171.16.camel@ubuntu-vm-makita>

On Thu, 24 Apr 2014 21:16:27 +0900
Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> wrote:

> +static int br_dev_newlink(struct net *src_net, struct net_device *dev,
> +			  struct nlattr *tb[], struct nlattr *data[])
> +{
> +	int err;
> +	struct net_bridge *br = netdev_priv(dev);
> +
> +	if (tb[IFLA_ADDRESS]) {
> +		spin_lock_bh(&br->lock);
> +		br_stp_change_bridge_id(br, nla_data(tb[IFLA_ADDRESS]));
> +		spin_unlock_bh(&br->lock);
> +	}
> +
> +	err = register_netdevice(dev);
> +	if (err)
> +		return err;
> +
> +	return 0;
> +}

Looks good.

Why not just do simpler tail call??
    return register_netdevice(dev);

  parent reply	other threads:[~2014-04-24 18:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-21 19:33 [Bridge] [BUG?] bridge_id not getting set for bridges created with Tom Gundersen
2014-04-21 20:56 ` Tom Gundersen
2014-04-24 12:06   ` Toshiaki Makita
2014-04-24 12:16     ` [Bridge] [PATCH net] bridge: Handle IFLA_ADDRESS correctly when creating bridge device Toshiaki Makita
2014-04-24 16:04       ` Tom Gundersen
2014-04-25  8:18         ` Toshiaki Makita
2014-04-24 18:38       ` Stephen Hemminger [this message]
2014-04-25  7:54         ` Toshiaki Makita
2014-04-25  8:01           ` [Bridge] [PATCH net v2] " Toshiaki Makita
2014-04-27 23:54             ` David Miller
2014-04-24 12:30     ` [Bridge] Unsubscribe me in this Forum Amidu Sila

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=20140424113827.6d27ec5b@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber.org \
    --cc=bridge@lists.linux-foundation.org \
    --cc=cr@saltstack.com \
    --cc=davem@davemloft.net \
    --cc=makita.toshiaki@lab.ntt.co.jp \
    --cc=netdev@vger.kernel.org \
    --cc=teg@jklm.no \
    /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