diff mbox series

[rdma-core,3/7] libhns: Remove redundant variable initialization

Message ID 20211109124103.54326-4-liangwenpeng@huawei.com (mailing list archive)
State Not Applicable
Headers show
Series libhns: Cleanup about removing redundant code and cleaning up static alarms | expand

Commit Message

Wenpeng Liang Nov. 9, 2021, 12:40 p.m. UTC
From: Yixing Liu <liuyixing1@huawei.com>

The variable of owner_bit has been assigned before the reference, so there
is no need to initialize.

Signed-off-by: Yixing Liu <liuyixing1@huawei.com>
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
---
 providers/hns/hns_roce_u_hw_v2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/providers/hns/hns_roce_u_hw_v2.c b/providers/hns/hns_roce_u_hw_v2.c
index 1e8df6ef..31a0681d 100644
--- a/providers/hns/hns_roce_u_hw_v2.c
+++ b/providers/hns/hns_roce_u_hw_v2.c
@@ -1375,9 +1375,9 @@  static void __hns_roce_v2_cq_clean(struct hns_roce_cq *cq, uint32_t qpn,
 {
 	int nfreed = 0;
 	bool is_recv_cqe;
+	uint8_t owner_bit;
 	uint16_t wqe_index;
 	uint32_t prod_index;
-	uint8_t owner_bit = 0;
 	struct hns_roce_v2_cqe *cqe, *dest;
 	struct hns_roce_context *ctx = to_hr_ctx(cq->ibv_cq.context);