diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-04-06 14:35:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-04-06 14:35:32 -0400 |
commit | 9cb5b787db7089015a78c81564ea5ffad2791a0e (patch) | |
tree | 08c66941bc8696f9876ccced32bab3a2b52eb9ec | |
parent | 541d8f4d59d79f5d37c8c726f723d42ff307db57 (diff) | |
parent | 2fe7857176ad6b70e8b2a318506525410e774f34 (diff) |
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma
Pull rdma fixes from Doug Ledford:
"I'm back from PTO. These issues cropped up while I was gone and are
simple fixes. I'll have more after I've caught up, but I wanted to
get these in quick.
Two minor fixes for 4.6-rc2:
- Fix mlx5 build error when on demand paging is not enabled
- Fix possible uninit variable in new i40iw driver"
* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma:
i40iw: avoid potential uninitialized variable use
IB/mlx5: fix VFs callback function prototypes
-rw-r--r-- | drivers/infiniband/hw/i40iw/i40iw_cm.c | 10 | ||||
-rw-r--r-- | drivers/infiniband/hw/mlx5/mlx5_ib.h | 18 |
2 files changed, 12 insertions, 16 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_cm.c b/drivers/infiniband/hw/i40iw/i40iw_cm.c index 92745d755272..38f917a6c778 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_cm.c +++ b/drivers/infiniband/hw/i40iw/i40iw_cm.c | |||
@@ -1992,7 +1992,6 @@ static int i40iw_addr_resolve_neigh(struct i40iw_device *iwdev, | |||
1992 | /** | 1992 | /** |
1993 | * i40iw_get_dst_ipv6 | 1993 | * i40iw_get_dst_ipv6 |
1994 | */ | 1994 | */ |
1995 | #if IS_ENABLED(CONFIG_IPV6) | ||
1996 | static struct dst_entry *i40iw_get_dst_ipv6(struct sockaddr_in6 *src_addr, | 1995 | static struct dst_entry *i40iw_get_dst_ipv6(struct sockaddr_in6 *src_addr, |
1997 | struct sockaddr_in6 *dst_addr) | 1996 | struct sockaddr_in6 *dst_addr) |
1998 | { | 1997 | { |
@@ -2008,7 +2007,6 @@ static struct dst_entry *i40iw_get_dst_ipv6(struct sockaddr_in6 *src_addr, | |||
2008 | dst = ip6_route_output(&init_net, NULL, &fl6); | 2007 | dst = ip6_route_output(&init_net, NULL, &fl6); |
2009 | return dst; | 2008 | return dst; |
2010 | } | 2009 | } |
2011 | #endif | ||
2012 | 2010 | ||
2013 | /** | 2011 | /** |
2014 | * i40iw_addr_resolve_neigh_ipv6 - resolve neighbor ipv6 address | 2012 | * i40iw_addr_resolve_neigh_ipv6 - resolve neighbor ipv6 address |
@@ -2016,7 +2014,6 @@ static struct dst_entry *i40iw_get_dst_ipv6(struct sockaddr_in6 *src_addr, | |||
2016 | * @dst_ip: remote ip address | 2014 | * @dst_ip: remote ip address |
2017 | * @arpindex: if there is an arp entry | 2015 | * @arpindex: if there is an arp entry |
2018 | */ | 2016 | */ |
2019 | #if IS_ENABLED(CONFIG_IPV6) | ||
2020 | static int i40iw_addr_resolve_neigh_ipv6(struct i40iw_device *iwdev, | 2017 | static int i40iw_addr_resolve_neigh_ipv6(struct i40iw_device *iwdev, |
2021 | u32 *src, | 2018 | u32 *src, |
2022 | u32 *dest, | 2019 | u32 *dest, |
@@ -2089,7 +2086,6 @@ static int i40iw_addr_resolve_neigh_ipv6(struct i40iw_device *iwdev, | |||
2089 | dst_release(dst); | 2086 | dst_release(dst); |
2090 | return rc; | 2087 | return rc; |
2091 | } | 2088 | } |
2092 | #endif | ||
2093 | 2089 | ||
2094 | /** | 2090 | /** |
2095 | * i40iw_ipv4_is_loopback - check if loopback | 2091 | * i40iw_ipv4_is_loopback - check if loopback |
@@ -2190,13 +2186,13 @@ static struct i40iw_cm_node *i40iw_make_cm_node( | |||
2190 | cm_info->loc_addr[0], | 2186 | cm_info->loc_addr[0], |
2191 | cm_info->rem_addr[0], | 2187 | cm_info->rem_addr[0], |
2192 | oldarpindex); | 2188 | oldarpindex); |
2193 | #if IS_ENABLED(CONFIG_IPV6) | 2189 | else if (IS_ENABLED(CONFIG_IPV6)) |
2194 | else | ||
2195 | arpindex = i40iw_addr_resolve_neigh_ipv6(iwdev, | 2190 | arpindex = i40iw_addr_resolve_neigh_ipv6(iwdev, |
2196 | cm_info->loc_addr, | 2191 | cm_info->loc_addr, |
2197 | cm_info->rem_addr, | 2192 | cm_info->rem_addr, |
2198 | oldarpindex); | 2193 | oldarpindex); |
2199 | #endif | 2194 | else |
2195 | arpindex = -EINVAL; | ||
2200 | } | 2196 | } |
2201 | if (arpindex < 0) { | 2197 | if (arpindex < 0) { |
2202 | i40iw_pr_err("cm_node arpindex\n"); | 2198 | i40iw_pr_err("cm_node arpindex\n"); |
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h index f16c818ad2e6..b46c25542a7c 100644 --- a/drivers/infiniband/hw/mlx5/mlx5_ib.h +++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h | |||
@@ -776,15 +776,6 @@ void mlx5_ib_qp_disable_pagefaults(struct mlx5_ib_qp *qp); | |||
776 | void mlx5_ib_qp_enable_pagefaults(struct mlx5_ib_qp *qp); | 776 | void mlx5_ib_qp_enable_pagefaults(struct mlx5_ib_qp *qp); |
777 | void mlx5_ib_invalidate_range(struct ib_umem *umem, unsigned long start, | 777 | void mlx5_ib_invalidate_range(struct ib_umem *umem, unsigned long start, |
778 | unsigned long end); | 778 | unsigned long end); |
779 | int mlx5_ib_get_vf_config(struct ib_device *device, int vf, | ||
780 | u8 port, struct ifla_vf_info *info); | ||
781 | int mlx5_ib_set_vf_link_state(struct ib_device *device, int vf, | ||
782 | u8 port, int state); | ||
783 | int mlx5_ib_get_vf_stats(struct ib_device *device, int vf, | ||
784 | u8 port, struct ifla_vf_stats *stats); | ||
785 | int mlx5_ib_set_vf_guid(struct ib_device *device, int vf, u8 port, | ||
786 | u64 guid, int type); | ||
787 | |||
788 | #else /* CONFIG_INFINIBAND_ON_DEMAND_PAGING */ | 779 | #else /* CONFIG_INFINIBAND_ON_DEMAND_PAGING */ |
789 | static inline void mlx5_ib_internal_fill_odp_caps(struct mlx5_ib_dev *dev) | 780 | static inline void mlx5_ib_internal_fill_odp_caps(struct mlx5_ib_dev *dev) |
790 | { | 781 | { |
@@ -801,6 +792,15 @@ static inline void mlx5_ib_qp_enable_pagefaults(struct mlx5_ib_qp *qp) {} | |||
801 | 792 | ||
802 | #endif /* CONFIG_INFINIBAND_ON_DEMAND_PAGING */ | 793 | #endif /* CONFIG_INFINIBAND_ON_DEMAND_PAGING */ |
803 | 794 | ||
795 | int mlx5_ib_get_vf_config(struct ib_device *device, int vf, | ||
796 | u8 port, struct ifla_vf_info *info); | ||
797 | int mlx5_ib_set_vf_link_state(struct ib_device *device, int vf, | ||
798 | u8 port, int state); | ||
799 | int mlx5_ib_get_vf_stats(struct ib_device *device, int vf, | ||
800 | u8 port, struct ifla_vf_stats *stats); | ||
801 | int mlx5_ib_set_vf_guid(struct ib_device *device, int vf, u8 port, | ||
802 | u64 guid, int type); | ||
803 | |||
804 | __be16 mlx5_get_roce_udp_sport(struct mlx5_ib_dev *dev, u8 port_num, | 804 | __be16 mlx5_get_roce_udp_sport(struct mlx5_ib_dev *dev, u8 port_num, |
805 | int index); | 805 | int index); |
806 | 806 | ||