* [PATCH 0/2] IB/mlx4: Code cleanup in cm.c
@ 2017-04-28 11:06 Hakon Bugge
[not found] ` <20170428110654.13176-1-Haakon.Bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Hakon Bugge @ 2017-04-28 11:06 UTC (permalink / raw)
To: Doug Ledford
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Yishai Hadas, Sean Hefty,
Hal Rosenstock, 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 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] IB/mlx4: Change flush logic so it adheres to the variable name
[not found] ` <20170428110654.13176-1-Haakon.Bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2017-04-28 11:06 ` Hakon Bugge
[not found] ` <20170428110654.13176-2-Haakon.Bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-04-28 11:06 ` [PATCH 2/2] IB/mlx4: Fix incorrect order of formal and actual parameters Hakon Bugge
2017-05-01 20:55 ` [PATCH 0/2] IB/mlx4: Code cleanup in cm.c Doug Ledford
2 siblings, 1 reply; 6+ messages in thread
From: Hakon Bugge @ 2017-04-28 11:06 UTC (permalink / raw)
To: Doug Ledford
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Yishai Hadas, Sean Hefty,
Hal Rosenstock, Hakon Bugge, Håkon 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 <haakon.bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Suggested-by: Wengang Wang <wen.gang.wang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Reviewed-by: Wengang Wang <wen.gang.wang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Reviewed-by: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
drivers/infiniband/hw/mlx4/cm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/mlx4/cm.c b/drivers/infiniband/hw/mlx4/cm.c
index d648453..61f63fe 100644
--- a/drivers/infiniband/hw/mlx4/cm.c
+++ b/drivers/infiniband/hw/mlx4/cm.c
@@ -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*/
--
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] IB/mlx4: Fix incorrect order of formal and actual parameters
[not found] ` <20170428110654.13176-1-Haakon.Bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-04-28 11:06 ` [PATCH 1/2] IB/mlx4: Change flush logic so it adheres to the variable name Hakon Bugge
@ 2017-04-28 11:06 ` Hakon Bugge
[not found] ` <20170428110654.13176-3-Haakon.Bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-05-01 20:55 ` [PATCH 0/2] IB/mlx4: Code cleanup in cm.c Doug Ledford
2 siblings, 1 reply; 6+ messages in thread
From: Hakon Bugge @ 2017-04-28 11:06 UTC (permalink / raw)
To: Doug Ledford
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Yishai Hadas, Sean Hefty,
Hal Rosenstock, Hakon Bugge, Håkon Bugge
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.
Hence, this commit is a non-functional fix, improving readability.
Signed-off-by: Håkon Bugge <haakon.bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Reviewed-by: Wengang Wang <wen.gang.wang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Reviewed-by: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
drivers/infiniband/hw/mlx4/cm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/mlx4/cm.c b/drivers/infiniband/hw/mlx4/cm.c
index 61f63fe..1e6c526 100644
--- a/drivers/infiniband/hw/mlx4/cm.c
+++ b/drivers/infiniband/hw/mlx4/cm.c
@@ -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
--
2.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] IB/mlx4: Change flush logic so it adheres to the variable name
[not found] ` <20170428110654.13176-2-Haakon.Bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2017-04-30 11:34 ` Leon Romanovsky
0 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2017-04-30 11:34 UTC (permalink / raw)
To: Hakon Bugge
Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Yishai Hadas,
Sean Hefty, Hal Rosenstock
[-- Attachment #1: Type: text/plain, Size: 824 bytes --]
On Fri, Apr 28, 2017 at 01:06:53PM +0200, Hakon Bugge wrote:
> 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 <haakon.bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Suggested-by: Wengang Wang <wen.gang.wang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Reviewed-by: Wengang Wang <wen.gang.wang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Reviewed-by: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
> 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,
Acked-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] IB/mlx4: Fix incorrect order of formal and actual parameters
[not found] ` <20170428110654.13176-3-Haakon.Bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2017-04-30 11:36 ` Leon Romanovsky
0 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2017-04-30 11:36 UTC (permalink / raw)
To: Hakon Bugge
Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Yishai Hadas,
Sean Hefty, Hal Rosenstock
[-- Attachment #1: Type: text/plain, Size: 762 bytes --]
On Fri, Apr 28, 2017 at 01:06:54PM +0200, Hakon Bugge wrote:
> 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.
>
> Hence, this commit is a non-functional fix, improving readability.
>
> Signed-off-by: Håkon Bugge <haakon.bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Reviewed-by: Wengang Wang <wen.gang.wang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Reviewed-by: Knut Omang <knut.omang-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
"non-functional fix" => "no functional change"
Thanks,
Acked-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] IB/mlx4: Code cleanup in cm.c
[not found] ` <20170428110654.13176-1-Haakon.Bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-04-28 11:06 ` [PATCH 1/2] IB/mlx4: Change flush logic so it adheres to the variable name Hakon Bugge
2017-04-28 11:06 ` [PATCH 2/2] IB/mlx4: Fix incorrect order of formal and actual parameters Hakon Bugge
@ 2017-05-01 20:55 ` Doug Ledford
2 siblings, 0 replies; 6+ messages in thread
From: Doug Ledford @ 2017-05-01 20:55 UTC (permalink / raw)
To: Hakon Bugge
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Yishai Hadas, Sean Hefty,
Hal Rosenstock
On Fri, 2017-04-28 at 13:06 +0200, Hakon Bugge wrote:
> 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(-)
I made the commit messages a bit clearer, but otherwise, series
applied, thanks.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-05-01 20:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-28 11:06 [PATCH 0/2] IB/mlx4: Code cleanup in cm.c Hakon Bugge
[not found] ` <20170428110654.13176-1-Haakon.Bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-04-28 11:06 ` [PATCH 1/2] IB/mlx4: Change flush logic so it adheres to the variable name Hakon Bugge
[not found] ` <20170428110654.13176-2-Haakon.Bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-04-30 11:34 ` Leon Romanovsky
2017-04-28 11:06 ` [PATCH 2/2] IB/mlx4: Fix incorrect order of formal and actual parameters Hakon Bugge
[not found] ` <20170428110654.13176-3-Haakon.Bugge-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-04-30 11:36 ` Leon Romanovsky
2017-05-01 20:55 ` [PATCH 0/2] IB/mlx4: Code cleanup in cm.c Doug Ledford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).