Skip to content

Commit

Permalink
team: use netif_is_team_port()
Browse files Browse the repository at this point in the history
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>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Julian Wiedmann authored and David S. Miller committed Mar 29, 2019
1 parent 9f76489 commit acb10ea
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/team/team.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit acb10ea

Please sign in to comment.