]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix a -Wformat-nonliteral compile warning
authorYonglong Liu <liuyonglong@huawei.com>
Fri, 28 Jun 2019 11:50:11 +0000 (19:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Jun 2019 16:39:49 +0000 (09:39 -0700)
commit834c6b81023c851da2c3a6d8a66e672f5653d79e
tree0168134760c6564c7bc9b04751cbc4d15868765d
parent985216cb516700114ff0b94493e4c42e6479683e
net: hns3: fix a -Wformat-nonliteral compile warning

When setting -Wformat=2, there is a compiler warning like this:

hclge_main.c:xxx:x: warning: format not a string literal and no
format arguments [-Wformat-nonliteral]
strs[i].desc);
^~~~

This patch adds missing format parameter "%s" to snprintf() to
fix it.

Fixes: 22c0e2ce21dd ("Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c