diff options
author | Guojia Liao <liaoguojia@huawei.com> | 2019-10-31 19:23:18 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-31 12:03:23 -0700 |
commit | d6ad7c5306251f6e7f82e46118b8c13c08cebf7d (patch) | |
tree | 6810892f6f8a9a4559efb0944e8c8dbbb91fd6dd /drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | |
parent | 647522a5ef6401dcdb8ec417421e43fb21910167 (diff) |
net: hns3: cleanup some magic numbers
To make the code more readable, this patch replaces
some magic numbers with macro or sizeof operation.
Also uses macro lower_32_bits and upper_32_bits to
get bits 0-31 and 32-63 of a number, instead of
using type conversion and '>>' operation.
No functional change.
Signed-off-by: Guojia Liao <liaoguojia@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c index 97463e11aca7..088fc7c145e9 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c @@ -590,7 +590,8 @@ static int hclge_get_queue_id_in_pf(struct hclge_vport *vport, qid_in_pf = hclge_covert_handle_qid_global(&vport->nic, queue_id); memcpy(resp_data, &qid_in_pf, sizeof(qid_in_pf)); - return hclge_gen_resp_to_vf(vport, mbx_req, 0, resp_data, 2); + return hclge_gen_resp_to_vf(vport, mbx_req, 0, resp_data, + sizeof(resp_data)); } static int hclge_get_rss_key(struct hclge_vport *vport, |