* [PATCH iproute2] rdma: stat: fix return code
@ 2021-04-18 12:56 Andrea Claudi
2021-04-18 13:25 ` Leon Romanovsky
0 siblings, 1 reply; 2+ messages in thread
From: Andrea Claudi @ 2021-04-18 12:56 UTC (permalink / raw)
To: netdev; +Cc: stephen, dsahern, leon
libmnl defines MNL_CB_OK as 1 and MNL_CB_ERROR as -1. rdma uses these
return codes, and stat_qp_show_parse_cb() should do the same.
Fixes: 16ce4d23661a ("rdma: stat: initialize ret in stat_qp_show_parse_cb()")
Reported-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
---
rdma/stat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rdma/stat.c b/rdma/stat.c
index 3abedae7..8edf7bf1 100644
--- a/rdma/stat.c
+++ b/rdma/stat.c
@@ -307,7 +307,7 @@ static int stat_qp_show_parse_cb(const struct nlmsghdr *nlh, void *data)
struct rd *rd = data;
const char *name;
uint32_t idx;
- int ret = 0;
+ int ret = MNL_CB_OK;
mnl_attr_parse(nlh, 0, rd_attr_cb, tb);
if (!tb[RDMA_NLDEV_ATTR_DEV_INDEX] || !tb[RDMA_NLDEV_ATTR_DEV_NAME] ||
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iproute2] rdma: stat: fix return code
2021-04-18 12:56 [PATCH iproute2] rdma: stat: fix return code Andrea Claudi
@ 2021-04-18 13:25 ` Leon Romanovsky
0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2021-04-18 13:25 UTC (permalink / raw)
To: Andrea Claudi; +Cc: netdev, stephen, dsahern
On Sun, Apr 18, 2021 at 02:56:30PM +0200, Andrea Claudi wrote:
> libmnl defines MNL_CB_OK as 1 and MNL_CB_ERROR as -1. rdma uses these
> return codes, and stat_qp_show_parse_cb() should do the same.
>
> Fixes: 16ce4d23661a ("rdma: stat: initialize ret in stat_qp_show_parse_cb()")
> Reported-by: Leon Romanovsky <leon@kernel.org>
> Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
> ---
> rdma/stat.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Thanks,
Acked-by: Leon Romanovsky <leonro@nvidia.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-18 13:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-18 12:56 [PATCH iproute2] rdma: stat: fix return code Andrea Claudi
2021-04-18 13:25 ` Leon Romanovsky
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.