diff options
author | Rick Jones <rick.jones2@hp.com> | 2011-11-14 03:13:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-14 14:13:31 -0500 |
commit | 612a94d6f24eb2427eabf554392080302da664dd (patch) | |
tree | 00202ffa2c3a59b6f3e59e906e7b6a14375f88b6 /drivers/net/ethernet/sun/cassini.c | |
parent | e52fcb2462ac484e6dd6e68869536609f0216938 (diff) |
Sweep the last of the active .get_drvinfo floors under ethernet/
This round of floor sweeping converts strncpy calls in various .get_drvinfo
routines to the preferred strlcpy. It also does a modicum of other
cleaning in those routines.
Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sun/cassini.c')
-rw-r--r-- | drivers/net/ethernet/sun/cassini.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ethernet/sun/cassini.c b/drivers/net/ethernet/sun/cassini.c index fd40988c19a6..f10665f594c4 100644 --- a/drivers/net/ethernet/sun/cassini.c +++ b/drivers/net/ethernet/sun/cassini.c | |||
@@ -4532,10 +4532,9 @@ static void cas_set_multicast(struct net_device *dev) | |||
4532 | static void cas_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) | 4532 | static void cas_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) |
4533 | { | 4533 | { |
4534 | struct cas *cp = netdev_priv(dev); | 4534 | struct cas *cp = netdev_priv(dev); |
4535 | strncpy(info->driver, DRV_MODULE_NAME, ETHTOOL_BUSINFO_LEN); | 4535 | strlcpy(info->driver, DRV_MODULE_NAME, sizeof(info->driver)); |
4536 | strncpy(info->version, DRV_MODULE_VERSION, ETHTOOL_BUSINFO_LEN); | 4536 | strlcpy(info->version, DRV_MODULE_VERSION, sizeof(info->version)); |
4537 | info->fw_version[0] = '\0'; | 4537 | strlcpy(info->bus_info, pci_name(cp->pdev), sizeof(info->bus_info)); |
4538 | strncpy(info->bus_info, pci_name(cp->pdev), ETHTOOL_BUSINFO_LEN); | ||
4539 | info->regdump_len = cp->casreg_len < CAS_MAX_REGS ? | 4538 | info->regdump_len = cp->casreg_len < CAS_MAX_REGS ? |
4540 | cp->casreg_len : CAS_MAX_REGS; | 4539 | cp->casreg_len : CAS_MAX_REGS; |
4541 | info->n_stats = CAS_NUM_STAT_KEYS; | 4540 | info->n_stats = CAS_NUM_STAT_KEYS; |