* [PATCH v2 for-next] RDMA: Fix return value check for ib_get_eth_speed()
@ 2017-08-17 14:58 Selvin Xavier
[not found] ` <1502981887-31953-1-git-send-email-selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Selvin Xavier @ 2017-08-17 14:58 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Selvin Xavier
ib_get_eth_speed() return 0 on success. Fixing the condition checking
and prevent reporting failure for query_port verb.
Fixes: d41861942fc5 ("Add generic function to extract IB speed from netdev")
Signed-off-by: Selvin Xavier <selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
---
v1 -> v2:
Fixing the commit log. Also, fixes the same issue in usnic driver also
drivers/infiniband/hw/bnxt_re/ib_verbs.c | 4 ++--
drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
index d78fedc..3fa20e0 100644
--- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
+++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
@@ -264,8 +264,8 @@ int bnxt_re_query_port(struct ib_device *ibdev, u8 port_num,
* IB stack to avoid race in the NETDEV_UNREG path
*/
if (test_bit(BNXT_RE_FLAG_IBDEV_REGISTERED, &rdev->flags))
- if (!ib_get_eth_speed(ibdev, port_num, &port_attr->active_speed,
- &port_attr->active_width))
+ if (ib_get_eth_speed(ibdev, port_num, &port_attr->active_speed,
+ &port_attr->active_width))
return -EINVAL;
return 0;
}
diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
index e5f57dd..97dd79e 100644
--- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
+++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
@@ -309,8 +309,8 @@ int usnic_ib_query_port(struct ib_device *ibdev, u8 port,
usnic_dbg("\n");
mutex_lock(&us_ibdev->usdev_lock);
- if (!ib_get_eth_speed(ibdev, port, &props->active_speed,
- &props->active_width)) {
+ if (ib_get_eth_speed(ibdev, port, &props->active_speed,
+ &props->active_width)) {
mutex_unlock(&us_ibdev->usdev_lock);
return -EINVAL;
}
--
2.5.5
--
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] 4+ messages in thread
* Re: [PATCH v2 for-next] RDMA: Fix return value check for ib_get_eth_speed()
[not found] ` <1502981887-31953-1-git-send-email-selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
@ 2017-08-17 15:23 ` Leon Romanovsky
2017-08-17 17:03 ` Yuval Shaia
2017-08-22 20:37 ` Doug Ledford
2 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2017-08-17 15:23 UTC (permalink / raw)
To: Selvin Xavier
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 703 bytes --]
On Thu, Aug 17, 2017 at 07:58:07AM -0700, Selvin Xavier wrote:
> ib_get_eth_speed() return 0 on success. Fixing the condition checking
> and prevent reporting failure for query_port verb.
>
> Fixes: d41861942fc5 ("Add generic function to extract IB speed from netdev")
> Signed-off-by: Selvin Xavier <selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
> ---
> v1 -> v2:
> Fixing the commit log. Also, fixes the same issue in usnic driver also
> drivers/infiniband/hw/bnxt_re/ib_verbs.c | 4 ++--
> drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
Thanks,
Reviewed-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] 4+ messages in thread
* Re: [PATCH v2 for-next] RDMA: Fix return value check for ib_get_eth_speed()
[not found] ` <1502981887-31953-1-git-send-email-selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-08-17 15:23 ` Leon Romanovsky
@ 2017-08-17 17:03 ` Yuval Shaia
2017-08-22 20:37 ` Doug Ledford
2 siblings, 0 replies; 4+ messages in thread
From: Yuval Shaia @ 2017-08-17 17:03 UTC (permalink / raw)
To: Selvin Xavier
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
linux-rdma-u79uwXL29TY76Z2rM5mHXA
On Thu, Aug 17, 2017 at 07:58:07AM -0700, Selvin Xavier wrote:
> ib_get_eth_speed() return 0 on success. Fixing the condition checking
> and prevent reporting failure for query_port verb.
>
> Fixes: d41861942fc5 ("Add generic function to extract IB speed from netdev")
oops
Reviewed-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Selvin Xavier <selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
> ---
> v1 -> v2:
> Fixing the commit log. Also, fixes the same issue in usnic driver also
> drivers/infiniband/hw/bnxt_re/ib_verbs.c | 4 ++--
> drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/infiniband/hw/bnxt_re/ib_verbs.c b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> index d78fedc..3fa20e0 100644
> --- a/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> +++ b/drivers/infiniband/hw/bnxt_re/ib_verbs.c
> @@ -264,8 +264,8 @@ int bnxt_re_query_port(struct ib_device *ibdev, u8 port_num,
> * IB stack to avoid race in the NETDEV_UNREG path
> */
> if (test_bit(BNXT_RE_FLAG_IBDEV_REGISTERED, &rdev->flags))
> - if (!ib_get_eth_speed(ibdev, port_num, &port_attr->active_speed,
> - &port_attr->active_width))
> + if (ib_get_eth_speed(ibdev, port_num, &port_attr->active_speed,
> + &port_attr->active_width))
> return -EINVAL;
> return 0;
> }
> diff --git a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
> index e5f57dd..97dd79e 100644
> --- a/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
> +++ b/drivers/infiniband/hw/usnic/usnic_ib_verbs.c
> @@ -309,8 +309,8 @@ int usnic_ib_query_port(struct ib_device *ibdev, u8 port,
> usnic_dbg("\n");
>
> mutex_lock(&us_ibdev->usdev_lock);
> - if (!ib_get_eth_speed(ibdev, port, &props->active_speed,
> - &props->active_width)) {
> + if (ib_get_eth_speed(ibdev, port, &props->active_speed,
> + &props->active_width)) {
> mutex_unlock(&us_ibdev->usdev_lock);
> return -EINVAL;
> }
> --
> 2.5.5
>
> --
> 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
--
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] 4+ messages in thread
* Re: [PATCH v2 for-next] RDMA: Fix return value check for ib_get_eth_speed()
[not found] ` <1502981887-31953-1-git-send-email-selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-08-17 15:23 ` Leon Romanovsky
2017-08-17 17:03 ` Yuval Shaia
@ 2017-08-22 20:37 ` Doug Ledford
2 siblings, 0 replies; 4+ messages in thread
From: Doug Ledford @ 2017-08-22 20:37 UTC (permalink / raw)
To: Selvin Xavier; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
On Thu, 2017-08-17 at 07:58 -0700, Selvin Xavier wrote:
> ib_get_eth_speed() return 0 on success. Fixing the condition checking
> and prevent reporting failure for query_port verb.
>
> Fixes: d41861942fc5 ("Add generic function to extract IB speed from
> netdev")
> Signed-off-by: Selvin Xavier <selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Thanks, applied.
--
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] 4+ messages in thread
end of thread, other threads:[~2017-08-22 20:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-17 14:58 [PATCH v2 for-next] RDMA: Fix return value check for ib_get_eth_speed() Selvin Xavier
[not found] ` <1502981887-31953-1-git-send-email-selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-08-17 15:23 ` Leon Romanovsky
2017-08-17 17:03 ` Yuval Shaia
2017-08-22 20:37 ` 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).