* [PATCH net-next] team: use netif_is_team_port()
@ 2019-03-29 13:37 Julian Wiedmann
2019-03-29 13:49 ` Jiri Pirko
2019-03-29 20:48 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Julian Wiedmann @ 2019-03-29 13:37 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Julian Wiedmann, Jiri Pirko
Replace the team_port_exists() macro with its twin from netdevice.h
CC: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
drivers/net/team/team.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 6ad74f898832..a622ec33453a 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -38,13 +38,11 @@
* Helpers
**********/
-#define team_port_exists(dev) (dev->priv_flags & IFF_TEAM_PORT)
-
static struct team_port *team_port_get_rtnl(const struct net_device *dev)
{
struct team_port *port = rtnl_dereference(dev->rx_handler_data);
- return team_port_exists(dev) ? port : NULL;
+ return netif_is_team_port(dev) ? port : NULL;
}
/*
@@ -1143,7 +1141,7 @@ static int team_port_add(struct team *team, struct net_device *port_dev,
return -EINVAL;
}
- if (team_port_exists(port_dev)) {
+ if (netif_is_team_port(port_dev)) {
NL_SET_ERR_MSG(extack, "Device is already a port of a team device");
netdev_err(dev, "Device %s is already a port "
"of a team device\n", portname);
--
2.16.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-01 18:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-29 13:37 [PATCH net-next] team: use netif_is_team_port() Julian Wiedmann
2019-03-29 13:49 ` Jiri Pirko
2019-03-29 20:48 ` David Miller
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).