net/hns3: fix unintended sign extension in dump operation
authorHongbo Zheng <zhenghongbo3@huawei.com>
Tue, 9 Jun 2020 08:44:17 +0000 (16:44 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jun 2020 17:21:07 +0000 (19:21 +0200)
commit5045e2b25ab1ce9ded4023b60fda7489a2b06663
treedee6bf11f4c71212bf1eb94631efb8519751b60a
parent5c471cb581ebd9a06918dbf5092f4228cc1e565e
net/hns3: fix unintended sign extension in dump operation

There are coverity defects related "Unintended sign extension" in the
internal static function named hns3_get_regs_length used for dumping reg
operation.

This patch fixes them by replacing the data type of cmdq_lines,
common_lines, ring_lines and tqp_intr_lines with uint32_t in the inner
static function named hns3_get_regs_length of hns3 PMD driver.

Coverity issue: 349917, 349914
Fixes: 936eda25e8da ("net/hns3: support dump register")
Cc: stable@dpdk.org
Signed-off-by: Hongbo Zheng <zhenghongbo3@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
drivers/net/hns3/hns3_regs.c