Skip to contentSkip to conversation

RDMA/hns: remove duplicate assignment to pointer raq

PATCH Applied Colin King 3 participants 3 messages May 28, 2020 – May 29, 2020

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 RDMA/hns: remove duplicate assignment to pointer raq

From: Colin Ian King <[email protected]>

The pointer raq is being assigned twice. Fix this by removing one of the redundant assignments.

Fixes 14ba87304bf9 ("RDMA/hns: Remove redundant type cast for general pointers")

Addressses-Coverity: ("Evaluation order violation")

---
 drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/hns/hns_roce_hw_v1.c +1 -1
index 8ff6b922b4d7..d02207cd30df 100644
@@ -1146,7 +1146,7 @@ static void hns_roce_db_free(struct hns_roce_dev *hr_dev)
 static int hns_roce_raq_init(struct hns_roce_dev *hr_dev)
 {
 	struct hns_roce_v1_priv *priv = hr_dev->priv;
-	struct hns_roce_raq_table *raq = raq = &priv->raq_table;
+	struct hns_roce_raq_table *raq = &priv->raq_table;
 	struct device *dev = &hr_dev->pdev->dev;
 	int raq_shift = 0;
 	dma_addr_t addr;
Signature · 1 line
2.25.1
#1 lore raw
Quoted 18 lines · Colin King

From: Colin Ian King <[email protected]>

The pointer raq is being assigned twice. Fix this by removing one of the redundant assignments.

Fixes 14ba87304bf9 ("RDMA/hns: Remove redundant type cast for general pointers")

Addressses-Coverity: ("Evaluation order violation")

---
  drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/hns/hns_roce_hw_v1.c +0 -0
index 8ff6b922b4d7..d02207cd30df 100644

drivers/infiniband/hw/hns/hns_roce_hw_v1.c static void hns_roce_db_free(struct hns_roce_dev *hr_dev) · line 1152

Quoted 8 lines
drivers/infiniband/hw/hns/hns_roce_hw_v1.c +1 -1
@@ -1146,7 +1146,7 @@ static void hns_roce_db_free(struct hns_roce_dev *hr_dev)
  static int hns_roce_raq_init(struct hns_roce_dev *hr_dev)
  {
  	struct hns_roce_v1_priv *priv = hr_dev->priv;
-	struct hns_roce_raq_table *raq = raq = &priv->raq_table;
+	struct hns_roce_raq_table *raq = &priv->raq_table;
  	struct device *dev = &hr_dev->pdev->dev;
  	int raq_shift = 0;
  	dma_addr_t addr;

thanks

#2 lore raw
In reply to Colin King
Quoted 11 lines · Colin King

From: Colin Ian King <[email protected]>

The pointer raq is being assigned twice. Fix this by removing one of the redundant assignments.

Fixes 14ba87304bf9 ("RDMA/hns: Remove redundant type cast for general pointers")

Addressses-Coverity: ("Evaluation order violation")

---
 drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next

Thanks,
Jason