diff options
author | Hao Chen <chenhao288@hisilicon.com> | 2021-12-03 17:20:52 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-12-03 11:00:59 +0000 |
commit | 0cc25c6a14efd709f2cfcde345e3d5c6aa20f80e (patch) | |
tree | 13a5337c079805f6aebae8b2a8fd23c3ac98be47 /drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c | |
parent | net: hns3: add print vport id for failed message of vlan (diff) | |
download | wireguard-linux-0cc25c6a14efd709f2cfcde345e3d5c6aa20f80e.tar.xz wireguard-linux-0cc25c6a14efd709f2cfcde345e3d5c6aa20f80e.zip |
net: hns3: Align type of some variables with their print type
The c language has a set of implicit type conversions, when
two variables perform bitwise or arithmetic operations.
For example, variable A (type u16/u8) -1, its output is int type variable.
u16/u8 will convert to int type implicitly before it does arithmetic
operations. So, change 1 to unsigned type.
Signed-off-by: Hao Chen <chenhao288@hisilicon.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c index 65168125c42e..1d039e18dd72 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c @@ -99,7 +99,7 @@ static void hclge_dbg_fill_content(char *content, u16 len, static char *hclge_dbg_get_func_id_str(char *buf, u8 id) { if (id) - sprintf(buf, "vf%u", id - 1); + sprintf(buf, "vf%u", id - 1U); else sprintf(buf, "pf"); |