Commit b03ee4ca authored by Håkon Bugge's avatar Håkon Bugge Committed by Doug Ledford

IB/mlx4: Fix incorrect order of formal and actual parameters

The last two actual parameters when calling id_map_find_by_sl_id()
from id_map_get() are swapped. However, the same formal parameters to
id_map_get() have them swapped as well, inverting the effect of the
first error.

This commit improves readability, but makes no functional change to
the code.
Signed-off-by: default avatarHåkon Bugge <haakon.bugge@oracle.com>
Reviewed-by: default avatarWengang Wang <wen.gang.wang@oracle.com>
Reviewed-by: default avatarKnut Omang <knut.omang@oracle.com>
Acked-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 89878288
...@@ -279,14 +279,14 @@ id_map_alloc(struct ib_device *ibdev, int slave_id, u32 sl_cm_id) ...@@ -279,14 +279,14 @@ id_map_alloc(struct ib_device *ibdev, int slave_id, u32 sl_cm_id)
} }
static struct id_map_entry * static struct id_map_entry *
id_map_get(struct ib_device *ibdev, int *pv_cm_id, int sl_cm_id, int slave_id) id_map_get(struct ib_device *ibdev, int *pv_cm_id, int slave_id, int sl_cm_id)
{ {
struct id_map_entry *ent; struct id_map_entry *ent;
struct mlx4_ib_sriov *sriov = &to_mdev(ibdev)->sriov; struct mlx4_ib_sriov *sriov = &to_mdev(ibdev)->sriov;
spin_lock(&sriov->id_map_lock); spin_lock(&sriov->id_map_lock);
if (*pv_cm_id == -1) { if (*pv_cm_id == -1) {
ent = id_map_find_by_sl_id(ibdev, sl_cm_id, slave_id); ent = id_map_find_by_sl_id(ibdev, slave_id, sl_cm_id);
if (ent) if (ent)
*pv_cm_id = (int) ent->pv_cm_id; *pv_cm_id = (int) ent->pv_cm_id;
} else } else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment