ethtool: fix drvinfo strings set in drivers
authorJiri Pirko <jiri@resnulli.us>
Sun, 6 Jan 2013 00:44:26 +0000 (00:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Jan 2013 05:06:31 +0000 (21:06 -0800)
commit7826d43f2db45c9305a6e0ba165650e1a203f517
treea8659c995a37f58db809da9537aafac178431f31
parent2afb9b533423a9b97f84181e773cf9361d98fed6
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>
86 files changed:
arch/um/drivers/net_kern.c
drivers/infiniband/hw/nes/nes_nic.c
drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
drivers/net/bonding/bond_main.c
drivers/net/cris/eth_v10.c
drivers/net/ethernet/3com/3c501.c
drivers/net/ethernet/3com/3c509.c
drivers/net/ethernet/3com/3c515.c
drivers/net/ethernet/8390/3c503.c
drivers/net/ethernet/8390/ax88796.c
drivers/net/ethernet/adi/bfin_mac.c
drivers/net/ethernet/aeroflex/greth.c
drivers/net/ethernet/amd/au1000_eth.c
drivers/net/ethernet/amd/sunlance.c
drivers/net/ethernet/broadcom/bcm63xx_enet.c
drivers/net/ethernet/cirrus/ep93xx_eth.c
drivers/net/ethernet/davicom/dm9000.c
drivers/net/ethernet/dec/ewrk3.c
drivers/net/ethernet/dlink/dl2k.c
drivers/net/ethernet/emulex/benet/be_ethtool.c
drivers/net/ethernet/faraday/ftgmac100.c
drivers/net/ethernet/faraday/ftmac100.c
drivers/net/ethernet/freescale/fec.c
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
drivers/net/ethernet/freescale/gianfar.h
drivers/net/ethernet/freescale/gianfar_ethtool.c
drivers/net/ethernet/freescale/ucc_geth_ethtool.c
drivers/net/ethernet/i825xx/3c505.c
drivers/net/ethernet/i825xx/3c507.c
drivers/net/ethernet/ibm/emac/core.c
drivers/net/ethernet/ibm/ibmveth.c
drivers/net/ethernet/korina.c
drivers/net/ethernet/lantiq_etop.c
drivers/net/ethernet/marvell/pxa168_eth.c
drivers/net/ethernet/neterion/vxge/vxge-ethtool.c
drivers/net/ethernet/nuvoton/w90p910_ether.c
drivers/net/ethernet/nxp/lpc_eth.c
drivers/net/ethernet/octeon/octeon_mgmt.c
drivers/net/ethernet/packetengines/hamachi.c
drivers/net/ethernet/packetengines/yellowfin.c
drivers/net/ethernet/rdc/r6040.c
drivers/net/ethernet/sgi/ioc3-eth.c
drivers/net/ethernet/smsc/smc911x.c
drivers/net/ethernet/smsc/smc91x.c
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
drivers/net/ethernet/sun/sunbmac.c
drivers/net/ethernet/sun/sunqe.c
drivers/net/ethernet/sun/sunvnet.c
drivers/net/ethernet/tehuti/tehuti.c
drivers/net/ethernet/ti/cpmac.c
drivers/net/ethernet/ti/cpsw.c
drivers/net/ethernet/ti/davinci_emac.c
drivers/net/ethernet/toshiba/ps3_gelic_net.c
drivers/net/ethernet/toshiba/spider_net_ethtool.c
drivers/net/ethernet/toshiba/tc35815.c
drivers/net/ethernet/xilinx/xilinx_axienet_main.c
drivers/net/ethernet/xircom/xirc2ps_cs.c
drivers/net/ethernet/xscale/ixp4xx_eth.c
drivers/net/hyperv/netvsc_drv.c
drivers/net/macvlan.c
drivers/net/rionet.c
drivers/net/usb/asix_common.c
drivers/net/usb/catc.c
drivers/net/usb/cdc_ncm.c
drivers/net/usb/pegasus.c
drivers/net/usb/rtl8150.c
drivers/net/usb/sierra_net.c
drivers/net/vmxnet3/vmxnet3_ethtool.c
drivers/net/wimax/i2400m/netdev.c
drivers/net/wimax/i2400m/usb.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
drivers/s390/net/qeth_core_main.c
drivers/staging/bcm/Bcmnet.c
drivers/staging/ccg/u_ether.c
drivers/staging/et131x/et131x.c
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
drivers/staging/octeon/ethernet-mdio.c
drivers/staging/rtl8192e/rtl8192e/rtl_ethtool.c
drivers/staging/wlags49_h2/wl_netdev.c
drivers/usb/gadget/u_ether.c
net/8021q/vlan_dev.c
net/batman-adv/soft-interface.c
net/bridge/br_device.c
net/dsa/slave.c
net/openvswitch/vport-internal_dev.c
net/wireless/ethtool.c