Skip to content

Commit 9cb5b78

Browse files
committed
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
2 parents 541d8f4 + 2fe7857 commit 9cb5b78

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

drivers/infiniband/hw/i40iw/i40iw_cm.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1992,7 +1992,6 @@ static int i40iw_addr_resolve_neigh(struct i40iw_device *iwdev,
19921992
/**
19931993
* i40iw_get_dst_ipv6
19941994
*/
1995-
#if IS_ENABLED(CONFIG_IPV6)
19961995
static struct dst_entry *i40iw_get_dst_ipv6(struct sockaddr_in6 *src_addr,
19971996
struct sockaddr_in6 *dst_addr)
19981997
{
@@ -2008,15 +2007,13 @@ static struct dst_entry *i40iw_get_dst_ipv6(struct sockaddr_in6 *src_addr,
20082007
dst = ip6_route_output(&init_net, NULL, &fl6);
20092008
return dst;
20102009
}
2011-
#endif
20122010

20132011
/**
20142012
* i40iw_addr_resolve_neigh_ipv6 - resolve neighbor ipv6 address
20152013
* @iwdev: iwarp device structure
20162014
* @dst_ip: remote ip address
20172015
* @arpindex: if there is an arp entry
20182016
*/
2019-
#if IS_ENABLED(CONFIG_IPV6)
20202017
static int i40iw_addr_resolve_neigh_ipv6(struct i40iw_device *iwdev,
20212018
u32 *src,
20222019
u32 *dest,
@@ -2089,7 +2086,6 @@ static int i40iw_addr_resolve_neigh_ipv6(struct i40iw_device *iwdev,
20892086
dst_release(dst);
20902087
return rc;
20912088
}
2092-
#endif
20932089

20942090
/**
20952091
* i40iw_ipv4_is_loopback - check if loopback
@@ -2190,13 +2186,13 @@ static struct i40iw_cm_node *i40iw_make_cm_node(
21902186
cm_info->loc_addr[0],
21912187
cm_info->rem_addr[0],
21922188
oldarpindex);
2193-
#if IS_ENABLED(CONFIG_IPV6)
2194-
else
2189+
else if (IS_ENABLED(CONFIG_IPV6))
21952190
arpindex = i40iw_addr_resolve_neigh_ipv6(iwdev,
21962191
cm_info->loc_addr,
21972192
cm_info->rem_addr,
21982193
oldarpindex);
2199-
#endif
2194+
else
2195+
arpindex = -EINVAL;
22002196
}
22012197
if (arpindex < 0) {
22022198
i40iw_pr_err("cm_node arpindex\n");

drivers/infiniband/hw/mlx5/mlx5_ib.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -776,15 +776,6 @@ void mlx5_ib_qp_disable_pagefaults(struct mlx5_ib_qp *qp);
776776
void mlx5_ib_qp_enable_pagefaults(struct mlx5_ib_qp *qp);
777777
void mlx5_ib_invalidate_range(struct ib_umem *umem, unsigned long start,
778778
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-
788779
#else /* CONFIG_INFINIBAND_ON_DEMAND_PAGING */
789780
static inline void mlx5_ib_internal_fill_odp_caps(struct mlx5_ib_dev *dev)
790781
{
@@ -801,6 +792,15 @@ static inline void mlx5_ib_qp_enable_pagefaults(struct mlx5_ib_qp *qp) {}
801792

802793
#endif /* CONFIG_INFINIBAND_ON_DEMAND_PAGING */
803794

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+
804804
__be16 mlx5_get_roce_udp_sport(struct mlx5_ib_dev *dev, u8 port_num,
805805
int index);
806806

0 commit comments

Comments
 (0)