aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/faraday/ftgmac100.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2013-01-05 19:44:26 -0500
committerDavid S. Miller <davem@davemloft.net>2013-01-07 00:06:31 -0500
commit7826d43f2db45c9305a6e0ba165650e1a203f517 (patch)
treea8659c995a37f58db809da9537aafac178431f31 /drivers/net/ethernet/faraday/ftgmac100.c
parent2afb9b533423a9b97f84181e773cf9361d98fed6 (diff)
ethtool: fix drvinfo strings set in drivers
Use strlcpy where possible to ensure the string is \0 terminated. Use always sizeof(string) instead of 32, ETHTOOL_BUSINFO_LEN and custom defines. Use snprintf instead of sprint. Remove unnecessary inits of ->fw_version Remove unnecessary inits of drvinfo struct. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/faraday/ftgmac100.c')
-rw-r--r--drivers/net/ethernet/faraday/ftgmac100.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index 74d749e29aab..96454b5fca63 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -955,9 +955,9 @@ static int ftgmac100_mdiobus_reset(struct mii_bus *bus)
955static void ftgmac100_get_drvinfo(struct net_device *netdev, 955static void ftgmac100_get_drvinfo(struct net_device *netdev,
956 struct ethtool_drvinfo *info) 956 struct ethtool_drvinfo *info)
957{ 957{
958 strcpy(info->driver, DRV_NAME); 958 strlcpy(info->driver, DRV_NAME, sizeof(info->driver));
959 strcpy(info->version, DRV_VERSION); 959 strlcpy(info->version, DRV_VERSION, sizeof(info->version));
960 strcpy(info->bus_info, dev_name(&netdev->dev)); 960 strlcpy(info->bus_info, dev_name(&netdev->dev), sizeof(info->bus_info));
961} 961}
962 962
963static int ftgmac100_get_settings(struct net_device *netdev, 963static int ftgmac100_get_settings(struct net_device *netdev,