netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, edumazet@google.com,
	bhutchings@solarflare.com, faisal.latif@intel.com,
	shemminger@vyatta.com, fbl@redhat.com, roland@kernel.org,
	sean.hefty@intel.com, hal.rosenstock@gmail.com, fubar@us.ibm.com,
	andy@greyhouse.net, divy@chelsio.com,
	jitendra.kalsaria@qlogic.com, sony.chacko@qlogic.com,
	linux-driver@qlogic.com, kaber@trash.net,
	ursula.braun@de.ibm.com, blaschka@linux.vnet.ibm.com,
	schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
	ebiederm@xmission.com, joe@perches.com, amwang@redhat.com,
	nhorman@tuxdriver.com, john.r.fastabend@intel.com,
	pablo@netfilter.org
Subject: [patch net-next 14/15] net: remove no longer used netdev_set_bond_master() and netdev_set_master()
Date: Sat, 29 Dec 2012 11:38:41 +0100	[thread overview]
Message-ID: <1356777522-19652-15-git-send-email-jiri@resnulli.us> (raw)
In-Reply-To: <1356777522-19652-1-git-send-email-jiri@resnulli.us>

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
 include/linux/netdevice.h |  6 +----
 net/core/dev.c            | 63 -----------------------------------------------
 2 files changed, 1 insertion(+), 68 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 2e5a217..94b5843 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -856,8 +856,7 @@ struct netdev_fcoe_hbainfo {
  *	flow_id is a flow ID to be passed to rps_may_expire_flow() later.
  *	Return the filter ID on success, or a negative error code.
  *
- *	Slave management functions (for bridge, bonding, etc). User should
- *	call netdev_set_master() to set dev->master properly.
+ *	Slave management functions (for bridge, bonding, etc).
  * int (*ndo_add_slave)(struct net_device *dev, struct net_device *slave_dev);
  *	Called to make another netdev an underling.
  *
@@ -2647,9 +2646,6 @@ extern int netdev_master_upper_dev_link(struct net_device *dev,
 					struct net_device *upper_dev);
 extern void netdev_upper_dev_unlink(struct net_device *dev,
 				    struct net_device *upper_dev);
-extern int		netdev_set_master(struct net_device *dev, struct net_device *master);
-extern int netdev_set_bond_master(struct net_device *dev,
-				  struct net_device *master);
 extern int skb_checksum_help(struct sk_buff *skb);
 extern struct sk_buff *skb_gso_segment(struct sk_buff *skb,
 	netdev_features_t features);
diff --git a/net/core/dev.c b/net/core/dev.c
index cf63a85..cdf7a19 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4842,69 +4842,6 @@ void netdev_upper_dev_unlink(struct net_device *dev,
 }
 EXPORT_SYMBOL(netdev_upper_dev_unlink);
 
-/**
- *	netdev_set_master	-	set up master pointer
- *	@slave: slave device
- *	@master: new master device
- *
- *	Changes the master device of the slave. Pass %NULL to break the
- *	bonding. The caller must hold the RTNL semaphore. On a failure
- *	a negative errno code is returned. On success the reference counts
- *	are adjusted and the function returns zero.
- */
-int netdev_set_master(struct net_device *slave, struct net_device *master)
-{
-	struct net_device *old = slave->master;
-	int err;
-
-	ASSERT_RTNL();
-
-	if (master) {
-		if (old)
-			return -EBUSY;
-		err = netdev_master_upper_dev_link(slave, master);
-		if (err)
-			return err;
-	}
-
-	slave->master = master;
-
-	if (old)
-		netdev_upper_dev_unlink(slave, master);
-
-	return 0;
-}
-EXPORT_SYMBOL(netdev_set_master);
-
-/**
- *	netdev_set_bond_master	-	set up bonding master/slave pair
- *	@slave: slave device
- *	@master: new master device
- *
- *	Changes the master device of the slave. Pass %NULL to break the
- *	bonding. The caller must hold the RTNL semaphore. On a failure
- *	a negative errno code is returned. On success %RTM_NEWLINK is sent
- *	to the routing socket and the function returns zero.
- */
-int netdev_set_bond_master(struct net_device *slave, struct net_device *master)
-{
-	int err;
-
-	ASSERT_RTNL();
-
-	err = netdev_set_master(slave, master);
-	if (err)
-		return err;
-	if (master)
-		slave->flags |= IFF_SLAVE;
-	else
-		slave->flags &= ~IFF_SLAVE;
-
-	rtmsg_ifinfo(RTM_NEWLINK, slave, IFF_SLAVE);
-	return 0;
-}
-EXPORT_SYMBOL(netdev_set_bond_master);
-
 static void dev_change_rx_flags(struct net_device *dev, int flags)
 {
 	const struct net_device_ops *ops = dev->netdev_ops;
-- 
1.8.0

  parent reply	other threads:[~2012-12-29 10:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-29 10:38 [patch net-next V3 00/15] net: introduce upper device lists and remove dev->master Jiri Pirko
2012-12-29 10:38 ` [patch net-next 01/15] net: introduce upper device lists Jiri Pirko
2012-12-29 23:31   ` David Miller
2012-12-30  9:53     ` Jiri Pirko
2012-12-29 10:38 ` [patch net-next 02/15] macvlan: add link to upper device Jiri Pirko
2012-12-29 10:38 ` [patch net-next 03/15] vlan: " Jiri Pirko
2012-12-29 10:38 ` [patch net-next 04/15] rtnetlink: remove usage of dev->master Jiri Pirko
2012-12-29 10:38 ` [patch net-next 05/15] team: remove usage of netdev_set_master() Jiri Pirko
2012-12-29 10:38 ` [patch net-next 06/15] bridge: " Jiri Pirko
2012-12-29 10:38 ` [patch net-next 07/15] netpoll: remove usage of dev->master Jiri Pirko
2012-12-29 10:38 ` [patch net-next 08/15] cxgb3: " Jiri Pirko
2012-12-29 10:38 ` [patch net-next 09/15] qlcnic: guard __vlan_find_dev_deep() by rcu_read_lock Jiri Pirko
2012-12-29 10:38 ` [patch net-next 10/15] qeth: ensure that __vlan_find_dev_deep() is called with rcu_read_lock Jiri Pirko
2012-12-29 10:38 ` [patch net-next 11/15] vlan: remove usage of dev->master in __vlan_find_dev_deep() Jiri Pirko
2012-12-29 10:38 ` [patch net-next 12/15] nes: remove usage of dev->master Jiri Pirko
2012-12-29 10:38 ` [patch net-next 13/15] bonding: " Jiri Pirko
2012-12-29 10:38 ` Jiri Pirko [this message]
2012-12-29 10:38 ` [patch net-next 15/15] net: kill dev->master Jiri Pirko
  -- strict thread matches above, loose matches on Subject: below --
2012-12-30 11:58 [patch net-next V4 00/15] net: introduce upper device lists and remove dev->master Jiri Pirko
2012-12-30 11:58 ` [patch net-next 14/15] net: remove no longer used netdev_set_bond_master() and netdev_set_master() Jiri Pirko

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=1356777522-19652-15-git-send-email-jiri@resnulli.us \
    --to=jiri@resnulli.us \
    --cc=amwang@redhat.com \
    --cc=andy@greyhouse.net \
    --cc=bhutchings@solarflare.com \
    --cc=blaschka@linux.vnet.ibm.com \
    --cc=davem@davemloft.net \
    --cc=divy@chelsio.com \
    --cc=ebiederm@xmission.com \
    --cc=edumazet@google.com \
    --cc=faisal.latif@intel.com \
    --cc=fbl@redhat.com \
    --cc=fubar@us.ibm.com \
    --cc=hal.rosenstock@gmail.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=jitendra.kalsaria@qlogic.com \
    --cc=joe@perches.com \
    --cc=john.r.fastabend@intel.com \
    --cc=kaber@trash.net \
    --cc=linux-driver@qlogic.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=pablo@netfilter.org \
    --cc=roland@kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=sean.hefty@intel.com \
    --cc=shemminger@vyatta.com \
    --cc=sony.chacko@qlogic.com \
    --cc=ursula.braun@de.ibm.com \
    /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).