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:42:20 +0000 (13:42 +0200)
commit6c1e6842cfaa93a2a4da62d1633b2460c297b8c7
treed822a01c811a917ee2d8694c6b16688480629ce0
parent435f0ab4790b7402cb71f6512fc390e641c2326c
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