[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1457409147-77086-3-git-send-email-lisheng011@huawei.com>
Date: Tue, 8 Mar 2016 11:52:25 +0800
From: Lisheng <lisheng011@...wei.com>
To: <davem@...emloft.net>
CC: <yisen.zhuang@...wei.com>, <yankejian@...wei.com>,
<xieqianqian@...wei.com>, <huangdaode@...ilicon.com>,
<salil.mehta@...wei.com>, <andriy.shevchenko@...ux.intel.com>,
<netdev@...r.kernel.org>, <haifeng.wei@...wei.com>,
<charles.chenxin@...wei.com>, <linuxarm@...wei.com>
Subject: [PATCH net 2/4] net: hns: bug fix for format string
From: Qianqian Xie <xieqianqian@...wei.com>
There is not a format string in function snprinf().
This patch will fix it.
Signed-off-by: Qianqian Xie <xieqianqian@...wei.com>
---
drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
index b8517b0..d0591d9 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c
@@ -641,7 +641,8 @@ static void hns_gmac_get_strings(u32 stringset, u8 *data)
return;
for (i = 0; i < ARRAY_SIZE(g_gmac_stats_string); i++) {
- snprintf(buff, ETH_GSTRING_LEN, g_gmac_stats_string[i].desc);
+ snprintf(buff, ETH_GSTRING_LEN, "%s",
+ g_gmac_stats_string[i].desc);
buff = buff + ETH_GSTRING_LEN;
}
}
--
1.9.1
Powered by blists - more mailing lists