aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLang Cheng <[email protected]>2019-11-05 19:07:59 +0800
committerJason Gunthorpe <[email protected]>2019-11-08 16:37:54 -0400
commit880f133c6026bee250220b773f556cc27bb62457 (patch)
tree8e1d8fccafd207b6677ac1a31c3be975021b0393
parent6eef524201deaaaf980bd21b80aac1b052cd56a7 (diff)
RDMA/hns: Simplify doorbell initialization code
If a variable needs to be set to 0 before use, it can be directly initialized to 0. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lang Cheng <[email protected]> Signed-off-by: Weihang Li <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_hw_v2.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 4700bac1c6e2..a8ce3716a63e 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -4944,10 +4944,7 @@ static void hns_roce_v2_init_irq_work(struct hns_roce_dev *hr_dev,
static void set_eq_cons_index_v2(struct hns_roce_eq *eq)
{
struct hns_roce_dev *hr_dev = eq->hr_dev;
- __le32 doorbell[2];
-
- doorbell[0] = 0;
- doorbell[1] = 0;
+ __le32 doorbell[2] = {};
if (eq->type_flag == HNS_ROCE_AEQ) {
roce_set_field(doorbell[0], HNS_ROCE_V2_EQ_DB_CMD_M,