linux-next: manual merge of the net-next tree with the rdma tree
Subsystems (3)
Hi all,
Today's linux-next merge of the net-next tree got a conflict in:
drivers/infiniband/hw/mlx5/ib_rep.c
between commits:
459cc69fa4c1 ("RDMA: Provide safe ib_alloc_device() function") fc9e4477f924 ("RDMA/mlx5: Fix memory leak in case we fail to add an IB device")
from the rdma tree and commit:
f0666f1f22b5 ("IB/mlx5: Use unified register/load function for uplink and VF vports")
from the net-next tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Signature · 36 lines
Cheers,
Stephen Rothwell
diff --cc drivers/infiniband/hw/mlx5/ib_rep.c
index 95ac97af6166,4700cffb5a00..000000000000
--- a/drivers/infiniband/hw/mlx5/ib_rep.c
+++ b/drivers/infiniband/hw/mlx5/ib_rep.c
@@@ -48,29 -49,15 +49,15 @@@ static const struct mlx5_ib_profile vf_
static int
mlx5_ib_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
{
+ const struct mlx5_ib_profile *profile;
struct mlx5_ib_dev *ibdev;
+ if (rep->vport == MLX5_VPORT_UPLINK)
+ profile = &uplink_rep_profile;
+ else
+ profile = &vf_rep_profile;
+
- ibdev = (struct mlx5_ib_dev *)ib_alloc_device(sizeof(*ibdev));
+ ibdev = ib_alloc_device(mlx5_ib_dev, ib_dev);
if (!ibdev)
return -ENOMEM;
@@@ -78,10 -65,8 +65,10 @@@
ibdev->mdev = dev;
ibdev->num_ports = max(MLX5_CAP_GEN(dev, num_ports),
MLX5_CAP_GEN(dev, num_vhca_ports));
- if (!__mlx5_ib_add(ibdev, &rep_profile)) {
- if (!__mlx5_ib_add(ibdev, profile))
++ if (!__mlx5_ib_add(ibdev, profile)) {
+ ib_dealloc_device(&ibdev->ib_dev);
return -EINVAL;
+ }
rep->rep_if[REP_IB].priv = ibdev;Quoted 15 lines · Stephen Rothwell
Hi all,
Today's linux-next merge of the net-next tree got a conflict in:
drivers/infiniband/hw/mlx5/ib_rep.cbetween commits:
459cc69fa4c1("RDMA: Provide safeib_alloc_device()function")fc9e4477f924("RDMA/mlx5: Fix memory leak in case we fail to add an IB device")from the rdma tree and commit:
f0666f1f22b5("IB/mlx5: Use unified register/load function for uplink and VF vports")
Quoted 9 lines
from the net-next tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Thanks a lot for your resolution.