Commit 426c4146 authored by Lijun Ou's avatar Lijun Ou Committed by Jason Gunthorpe

RDMA/hns: Use macro instead of magic number

This patch mainly uses CMD_CSQ_DESC_NUM instead of magic number in order
to improve readability.
Signed-off-by: default avatarLijun Ou <oulijun@huawei.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent ac7cbf96
...@@ -705,8 +705,8 @@ static int hns_roce_v2_cmq_init(struct hns_roce_dev *hr_dev) ...@@ -705,8 +705,8 @@ static int hns_roce_v2_cmq_init(struct hns_roce_dev *hr_dev)
int ret; int ret;
/* Setup the queue entries for command queue */ /* Setup the queue entries for command queue */
priv->cmq.csq.desc_num = 1024; priv->cmq.csq.desc_num = CMD_CSQ_DESC_NUM;
priv->cmq.crq.desc_num = 1024; priv->cmq.crq.desc_num = CMD_CRQ_DESC_NUM;
/* Setup the lock for command queue */ /* Setup the lock for command queue */
spin_lock_init(&priv->cmq.csq.lock); spin_lock_init(&priv->cmq.csq.lock);
......
...@@ -112,6 +112,9 @@ ...@@ -112,6 +112,9 @@
(step_idx == 1 && hop_num == 1) || \ (step_idx == 1 && hop_num == 1) || \
(step_idx == 2 && hop_num == 2)) (step_idx == 2 && hop_num == 2))
#define CMD_CSQ_DESC_NUM 1024
#define CMD_CRQ_DESC_NUM 1024
enum { enum {
NO_ARMED = 0x0, NO_ARMED = 0x0,
REG_NXT_CEQE = 0x2, REG_NXT_CEQE = 0x2,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment