net: hns3: clean up a type mismatch warning
authorGuojia Liao <liaoguojia@huawei.com>
Mon, 30 Aug 2021 13:51:07 +0000 (21:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Sep 2021 11:40:35 +0000 (13:40 +0200)
commit2c304c65defd4aaf2e4e0c8226c6e03cc09a7355
tree0ff131746284ca426961efa1eb4c6c319539ec42
parentfb1ee027878b30f7545c77b1cdf1f61136d21092
net: hns3: clean up a type mismatch warning

[ Upstream commit e79c0e324b011b0288cd411a5b53870a7730f163 ]

abs() returns signed long, which could not convert the type
as unsigned, and it may cause a mismatch type warning from
static tools. To fix it, this patch uses an variable to save
the abs()'s result and does a explicit conversion.

Signed-off-by: Guojia Liao <liaoguojia@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c