summaryrefslogtreecommitdiff
path: root/include/rdma/ib_addr.h
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2017-02-04 20:00:49 +0300
committerDavid S. Miller <davem@davemloft.net>2017-02-07 00:33:29 +0300
commitd0d7b10b05945f40fefd4e60f457c61aefa3e9a9 (patch)
tree1904a8455fc02954af05242261ee36feb1e45d1d /include/rdma/ib_addr.h
parent73cfb2a2e49e166c569360ee60fe023b3efe3cf6 (diff)
downloadlinux-d0d7b10b05945f40fefd4e60f457c61aefa3e9a9.tar.xz
net-next: treewide use is_vlan_dev() helper function.
This patch makes use of is_vlan_dev() function instead of flag comparison which is exactly done by is_vlan_dev() helper function. Signed-off-by: Parav Pandit <parav@mellanox.com> Reviewed-by: Daniel Jurgens <danielj@mellanox.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Jon Maxwell <jmaxwell37@gmail.com> Acked-by: Johannes Thumshirn <jth@kernel.org> Acked-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/rdma/ib_addr.h')
-rw-r--r--include/rdma/ib_addr.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h
index 1beab5532035..4b34c51f859e 100644
--- a/include/rdma/ib_addr.h
+++ b/include/rdma/ib_addr.h
@@ -160,8 +160,7 @@ static inline int rdma_addr_gid_offset(struct rdma_dev_addr *dev_addr)
static inline u16 rdma_vlan_dev_vlan_id(const struct net_device *dev)
{
- return dev->priv_flags & IFF_802_1Q_VLAN ?
- vlan_dev_vlan_id(dev) : 0xffff;
+ return is_vlan_dev(dev) ? vlan_dev_vlan_id(dev) : 0xffff;
}
static inline int rdma_ip2gid(struct sockaddr *addr, union ib_gid *gid)
@@ -326,8 +325,7 @@ static inline u16 rdma_get_vlan_id(union ib_gid *dgid)
static inline struct net_device *rdma_vlan_dev_real_dev(const struct net_device *dev)
{
- return dev->priv_flags & IFF_802_1Q_VLAN ?
- vlan_dev_real_dev(dev) : NULL;
+ return is_vlan_dev(dev) ? vlan_dev_real_dev(dev) : NULL;
}
#endif /* IB_ADDR_H */