]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: cleanup a format-truncation warning
authorGuojia Liao <liaoguojia@huawei.com>
Thu, 31 Oct 2019 11:23:20 +0000 (19:23 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Oct 2019 19:03:23 +0000 (12:03 -0700)
commit727631fcdab1e1126f8c32b0694984a8e0a34e0f
treebd07def9419200d7cd63f2fb1351644825798c53
parentf31ac660dde147da1532c7ba2b7fc1c6cacf0963
net: hns3: cleanup a format-truncation warning

In hns3_nic_init_irq(), when '*_int_idx' has more than 9 digits
and the length of netdev's name is IFNAMSIZ, the total length
of final name will be bigger the HNAE3_INT_NAME_LEN - 1, even
though '*_int_idx' will never have such large value, but the
compiler gives a format-truncation warning for this case.

So this patch just enlarges the length to avoid this warning.

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>
drivers/net/ethernet/hisilicon/hns3/hnae3.h