* [PATCH v2 net-next] net/mlx4: simplify the return expression of mlx4_init_cq_table()
@ 2020-12-09 1:20 Zheng Yongjun
2020-12-10 3:21 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-09 1:20 UTC (permalink / raw)
To: davem, kuba, netdev, linux-rdma, linux-kernel; +Cc: Zheng Yongjun
Simplify the return expression.
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/net/ethernet/mellanox/mlx4/cq.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/cq.c b/drivers/net/ethernet/mellanox/mlx4/cq.c
index 3b8576b9c2f9..f7053a74e6a8 100644
--- a/drivers/net/ethernet/mellanox/mlx4/cq.c
+++ b/drivers/net/ethernet/mellanox/mlx4/cq.c
@@ -462,19 +462,14 @@ EXPORT_SYMBOL_GPL(mlx4_cq_free);
int mlx4_init_cq_table(struct mlx4_dev *dev)
{
struct mlx4_cq_table *cq_table = &mlx4_priv(dev)->cq_table;
- int err;
spin_lock_init(&cq_table->lock);
INIT_RADIX_TREE(&cq_table->tree, GFP_ATOMIC);
if (mlx4_is_slave(dev))
return 0;
- err = mlx4_bitmap_init(&cq_table->bitmap, dev->caps.num_cqs,
- dev->caps.num_cqs - 1, dev->caps.reserved_cqs, 0);
- if (err)
- return err;
-
- return 0;
+ return mlx4_bitmap_init(&cq_table->bitmap, dev->caps.num_cqs,
+ dev->caps.num_cqs - 1, dev->caps.reserved_cqs, 0);
}
void mlx4_cleanup_cq_table(struct mlx4_dev *dev)
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 net-next] net/mlx4: simplify the return expression of mlx4_init_cq_table()
2020-12-09 1:20 [PATCH v2 net-next] net/mlx4: simplify the return expression of mlx4_init_cq_table() Zheng Yongjun
@ 2020-12-10 3:21 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-12-10 3:21 UTC (permalink / raw)
To: zhengyongjun3; +Cc: kuba, netdev, linux-rdma, linux-kernel
From: Zheng Yongjun <zhengyongjun3@huawei.com>
Date: Wed, 9 Dec 2020 09:20:02 +0800
> Simplify the return expression.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-10 3:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09 1:20 [PATCH v2 net-next] net/mlx4: simplify the return expression of mlx4_init_cq_table() Zheng Yongjun
2020-12-10 3:21 ` David Miller
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).