IB/mlx4: Code cleanup in cm.c
Subsystems (2)
cover IB/mlx4: Code cleanup in cm.c
This patchset contains two non-functional patches that cleans up two issues.
Hakon Bugge (2):
IB/mlx4: Change flush logic so it adheres to the variable name IB/mlx4: Fix incorrect order of formal and actual parameters
drivers/infiniband/hw/mlx4/cm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
--
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20170428110654.13176-1-Haakon.Bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org
PATCH 1/2 IB/mlx4: Change flush logic so it adheres to the variable name
Change and simplify the code to match the variable name. This is a non-functional change which improves readability.
--- drivers/infiniband/hw/mlx4/cm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/infiniband/hw/mlx4/cm.c +3 -3
@@ -414,7 +414,7 @@ void mlx4_ib_cm_paravirt_clean(struct mlx4_ib_dev *dev, int slave)struct rb_root *sl_id_map = &sriov->sl_id_map;struct list_head lh;struct rb_node *nd; -int need_flush =1 ; +int need_flush =0 ;struct id_map_entry *map, *tmp_map;/* cancel all delayed work queue entries */ INIT_LIST_HEAD (&lh);
@@ -422,13 +422,13 @@ void mlx4_ib_cm_paravirt_clean(struct mlx4_ib_dev *dev, int slave)list_for_each_entry_safe (map, tmp_map, &dev->sriov.cm_list, list) {if (slave <0 || slave == map->slave_id) {if (map->scheduled_delete) - need_flush &= !!cancel_delayed_work (&map->timeout); + need_flush |= !cancel_delayed_work (&map->timeout); } }spin_unlock (&sriov->id_map_lock); -if (!need_flush) +if (need_flush)flush_scheduled_work ();/* make sure all timers were flushed */ /* now, remove all leftover entries from databases*/
Signature · 6 lines
2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20170428110654.13176-2-Haakon.Bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org
Leon Romanovsky
Acked-byRe: [PATCH 1/2] IB/mlx4: Change flush logic so it adheres to the variable name
Quoted 11 lines · Hakon Bugge
Change and simplify the code to match the variable name. This is a non-functional change which improves readability.
Signed-off-by Håkon Bugge <[email protected]>Suggested-by Wengang Wang <[email protected]>Reviewed-by Wengang Wang <[email protected]>Reviewed-by Knut Omang <[email protected]>--- drivers/infiniband/hw/mlx4/cm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Except the word, "non-functional change", instead of "no functional change", everything looks good.
Thanks,
PATCH 2/2 IB/mlx4: Fix incorrect order of formal and actual parameters
In reply to a message not in the archiveThe 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.
Hence, this commit is a non-functional fix, improving readability.
--- drivers/infiniband/hw/mlx4/cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/hw/mlx4/cm.c +2 -2
@@ -279,14 +279,14 @@ id_map_alloc(struct ib_device *ibdev, int slave_id, u32 sl_cm_id) }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 mlx4_ib_sriov *sriov = &to_mdev (ibdev)->sriov;spin_lock (&sriov->id_map_lock);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) *pv_cm_id = (int ) ent->pv_cm_id; }else
Signature · 6 lines
2.9.3 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20170428110654.13176-3-Haakon.Bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org
Leon Romanovsky
Acked-byRe: [PATCH 2/2] IB/mlx4: Fix incorrect order of formal and actual parameters
Quoted 11 lines · Hakon Bugge
The last two actual parameters when calling
id_map_find_by_sl_id()fromid_map_get()are swapped. However, the same formal parameters toid_map_get()have them swapped as well, inverting the effect of the first error.Hence, this commit is a non-functional fix, improving readability.
Signed-off-by Håkon Bugge <[email protected]>Reviewed-by Wengang Wang <[email protected]>Reviewed-by Knut Omang <[email protected]>---
"non-functional fix" => "no functional change"
Thanks,
Quoted 9 lines · Hakon Bugge
This patchset contains two non-functional patches that cleans up two issues.
Hakon Bugge (2):
IB/mlx4: Change flush logic so it adheres to the variable name IB/mlx4: Fix incorrect order of formal and actual parametersdrivers/infiniband/hw/mlx4/cm.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
I made the commit messages a bit clearer, but otherwise, series applied, thanks.
Signature · 9 lines
Doug Ledford <[email protected]> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html