net: hns3: use macro instead of magic number
This patch uses macro to replace some magic number. Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a582b78dfc
commit
6f92bfd70a
@ -774,7 +774,8 @@ static void hclge_dbg_dump_qos_buf_cfg(struct hclge_dev *hdev)
|
||||
rx_priv_wl = (struct hclge_rx_priv_wl_buf *)desc[1].data;
|
||||
for (i = 0; i < HCLGE_TC_NUM_ONE_DESC; i++)
|
||||
dev_info(&hdev->pdev->dev,
|
||||
"rx_priv_wl_tc_%d: high: 0x%x, low: 0x%x\n", i + 4,
|
||||
"rx_priv_wl_tc_%d: high: 0x%x, low: 0x%x\n",
|
||||
i + HCLGE_TC_NUM_ONE_DESC,
|
||||
rx_priv_wl->tc_wl[i].high, rx_priv_wl->tc_wl[i].low);
|
||||
|
||||
cmd = HCLGE_OPC_RX_COM_THRD_ALLOC;
|
||||
@ -796,7 +797,8 @@ static void hclge_dbg_dump_qos_buf_cfg(struct hclge_dev *hdev)
|
||||
rx_com_thrd = (struct hclge_rx_com_thrd *)desc[1].data;
|
||||
for (i = 0; i < HCLGE_TC_NUM_ONE_DESC; i++)
|
||||
dev_info(&hdev->pdev->dev,
|
||||
"rx_com_thrd_tc_%d: high: 0x%x, low: 0x%x\n", i + 4,
|
||||
"rx_com_thrd_tc_%d: high: 0x%x, low: 0x%x\n",
|
||||
i + HCLGE_TC_NUM_ONE_DESC,
|
||||
rx_com_thrd->com_thrd[i].high,
|
||||
rx_com_thrd->com_thrd[i].low);
|
||||
return;
|
||||
|
@ -72,9 +72,10 @@ struct hclge_dbg_reg_common_msg {
|
||||
enum hclge_opcode_type cmd;
|
||||
};
|
||||
|
||||
#define HCLGE_DBG_MAX_DFX_MSG_LEN 60
|
||||
struct hclge_dbg_dfx_message {
|
||||
int flag;
|
||||
char message[60];
|
||||
char message[HCLGE_DBG_MAX_DFX_MSG_LEN];
|
||||
};
|
||||
|
||||
#define HCLGE_DBG_MAC_REG_TYPE_LEN 32
|
||||
|
Loading…
Reference in New Issue
Block a user