treewide: use ethtool_puts instead of memcpy
The former is a safer and more readable version. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Christian Marangi
parent
511c7ff032
commit
89ff407d68
@@ -944,8 +944,7 @@ static void rtl83xx_get_strings(struct dsa_switch *ds,
|
||||
return;
|
||||
|
||||
for (int i = 0; i < ARRAY_SIZE(rtl83xx_mib); i++)
|
||||
strncpy(data + i * ETH_GSTRING_LEN, rtl83xx_mib[i].name,
|
||||
ETH_GSTRING_LEN);
|
||||
ethtool_puts(&data, rtl83xx_mib[i].name);
|
||||
}
|
||||
|
||||
static void rtl83xx_get_ethtool_stats(struct dsa_switch *ds, int port,
|
||||
|
||||
Reference in New Issue
Block a user