From patchwork Fri Jan 4 08:48:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Pirko X-Patchwork-Id: 1931411 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 94BB4E016D for ; Fri, 4 Jan 2013 08:50:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754208Ab3ADIti (ORCPT ); Fri, 4 Jan 2013 03:49:38 -0500 Received: from mail-ee0-f46.google.com ([74.125.83.46]:57485 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754160Ab3ADItb (ORCPT ); Fri, 4 Jan 2013 03:49:31 -0500 Received: by mail-ee0-f46.google.com with SMTP id e53so7783690eek.5 for ; Fri, 04 Jan 2013 00:49:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=fB7PD51kvOmVZiJQKG2ANRgjOau5caFT9cQ/nj6DE8U=; b=IJP3Z9okdewTagLw4SLrhoJpwWHq7HuIwkzDFZLycI8nYdf1FE4UUeoNdARDxtj4UF p4yUIz5CvW1Oa6YWL4ekLb50/0sJc56T46Q3fetT4Ji4RhTl3cDDP9n1CEnJu0deIDt1 USnC3kD6wQzMfalyPBf86MB3ChR6I5nJRUEpwrJ2i3fbiadV3UqZVyByAS4xji7w8D+y 8mR+C4ADLpACMCzF9bhxu0xh5Q9nIHvVgqwVYhRkvzDHAgSd5Z2zRnD4dAdpyUSZMHWm n1qubyp0Hy5PkVVq2X34MVK9spXWiYUiAsHFkFNbZnrXe+pwC+0fqe+PKj2ericaetX2 EtsQ== X-Received: by 10.14.178.196 with SMTP id f44mr141756850eem.14.1357289370483; Fri, 04 Jan 2013 00:49:30 -0800 (PST) Received: from localhost (ip-89-103-8-129.net.upcbroadband.cz. [89.103.8.129]) by mx.google.com with ESMTPS id 6sm109288662eea.3.2013.01.04.00.49.27 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Jan 2013 00:49:29 -0800 (PST) From: Jiri Pirko To: netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, faisal.latif@intel.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, linux390@de.ibm.com, shemminger@vyatta.com, bhutchings@solarflare.com, therbert@google.com, xiyou.wangcong@gmail.com, joe@perches.com, gregory.v.rose@intel.com, john.r.fastabend@intel.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, bridge@lists.linux-foundation.org, fbl@redhat.com Subject: [patch net-next V6 05/15] team: remove usage of netdev_set_master() Date: Fri, 4 Jan 2013 09:48:53 +0100 Message-Id: <1357289343-817-6-git-send-email-jiri@resnulli.us> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1357289343-817-1-git-send-email-jiri@resnulli.us> References: <1357289343-817-1-git-send-email-jiri@resnulli.us> X-Gm-Message-State: ALoCoQl1EkWYBrE+bTqy2TW/shJHFoxnYF1GQChIdZdYOzy+VKNarLypwGKBU71SEguvK47xswlh Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Signed-off-by: Jiri Pirko --- drivers/net/team/team.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 78c7d87..5f35d6b 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c @@ -1055,10 +1055,11 @@ static int team_port_add(struct team *team, struct net_device *port_dev) } } - err = netdev_set_master(port_dev, dev); + err = netdev_master_upper_dev_link(port_dev, dev); if (err) { - netdev_err(dev, "Device %s failed to set master\n", portname); - goto err_set_master; + netdev_err(dev, "Device %s failed to set upper link\n", + portname); + goto err_set_upper_link; } err = netdev_rx_handler_register(port_dev, team_handle_frame, @@ -1091,9 +1092,9 @@ err_option_port_add: netdev_rx_handler_unregister(port_dev); err_handler_register: - netdev_set_master(port_dev, NULL); + netdev_upper_dev_unlink(port_dev, dev); -err_set_master: +err_set_upper_link: team_port_disable_netpoll(port); err_enable_netpoll: @@ -1137,7 +1138,7 @@ static int team_port_del(struct team *team, struct net_device *port_dev) team_port_disable(team, port); list_del_rcu(&port->list); netdev_rx_handler_unregister(port_dev); - netdev_set_master(port_dev, NULL); + netdev_upper_dev_unlink(port_dev, dev); team_port_disable_netpoll(port); vlan_vids_del_by_dev(port_dev, dev); dev_close(port_dev);