[PATCH rdma-core 4/4] libhns: Remove the unnecessary type conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The use of short type causes the value is truncated when
configured CQ ci, as a result, the hardware get the
different value and the CQ overflow.

Signed-off-by: Lijun Ou <oulijun@xxxxxxxxxx>
---
 providers/hns/hns_roce_u_hw_v1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/providers/hns/hns_roce_u_hw_v1.c b/providers/hns/hns_roce_u_hw_v1.c
index 013a2b4..1d256aa 100644
--- a/providers/hns/hns_roce_u_hw_v1.c
+++ b/providers/hns/hns_roce_u_hw_v1.c
@@ -411,7 +411,7 @@ static int hns_roce_u_v1_poll_cq(struct ibv_cq *ibvcq, int ne,
 
 	if (npolled) {
 		if (dev->hw_version == HNS_ROCE_HW_VER1) {
-			*cq->set_ci_db = (unsigned short)(cq->cons_index &
+			*cq->set_ci_db = (cq->cons_index &
 					 ((cq->cq_depth << 1) - 1));
 			mmio_ordered_writes_hack();
 		}
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux