linux_dsm_epyc7002/drivers/net/ethernet
Tony Nguyen e61e4c8b90 ixgbe: Resolve truncation warning for q_vector->name
The following warning is now shown as a result of new checks added for
gcc 7:

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c: In function ‘ixgbe_open’:
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:3118:13: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size between 3 and 18 [-Wformat-truncation=]
      "%s-%s-%d", netdev->name, "TxRx", ri++);
             ^~
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:3118:6: note: directive argument in the range [0, 2147483647]
      "%s-%s-%d", netdev->name, "TxRx", ri++);
      ^~~~~~~~~~
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c:3117:4: note: ‘snprintf’ output between 8 and 32 bytes into a destination of size 24
    snprintf(q_vector->name, sizeof(q_vector->name) - 1,
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      "%s-%s-%d", netdev->name, "TxRx", ri++);
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Resolve this warning by making a couple of changes.
 - Don't reserve space for the null terminator.  Since snprintf adds the
   null terminator automatically, there is no need for us to reserve a byte
   for it.

 - Change a couple variables that can never be negative from int to
   unsigned int.

While we're making changes to the format string, move the constant strings
into the format string instead of providing them as specifiers.

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2017-05-31 04:39:47 -07:00
..
3com Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
8390 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-05-26 20:46:35 -04:00
adaptec
adi
aeroflex
agere
alacritech
allwinner
alteon
altera
amazon net/ena: switch to pci_alloc_irq_vectors 2017-04-11 11:16:03 -04:00
amd net: ethernet: update drivers to make both SW and HW TX timestamps 2017-05-21 13:37:32 -04:00
apm xgene: Check all RGMII phy mode variants 2017-05-19 19:41:43 -04:00
apple
aquantia sk_buff: remove support for csum_bad in sk_buff 2017-05-19 19:21:29 -04:00
arc net: arc_emac: switch to phy_start()/phy_stop() 2017-04-21 15:23:52 -04:00
atheros net: atheros: atl2: don't return zero on failure path in atl2_probe() 2017-05-22 12:05:01 -04:00
aurora
broadcom bnxt_en: Fix xmit_more with BQL. 2017-05-30 22:37:06 -04:00
brocade bna: ethtool: Avoid reading past end of buffer 2017-05-08 14:41:42 -04:00
cadence net: macb: fix phy interrupt parsing 2017-04-30 22:21:49 -04:00
calxeda
cavium liquidio: fix inaccurate count of napi-processed rx packets reported to Octeon 2017-05-26 14:41:48 -04:00
chelsio cxgb4: Fix netdev_features flag 2017-05-30 14:16:34 -04:00
cirrus Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
cisco enic: unmask intr only when napi is complete 2017-05-23 11:05:45 -04:00
davicom
dec Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
dlink net: dl2k: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
emulex Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-05-26 20:46:35 -04:00
ezchip Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-06 08:24:51 -07:00
faraday net: ethernet: faraday: To support device tree usage. 2017-05-18 10:10:44 -04:00
freescale net: fec: add post PHY reset delay DT property 2017-05-24 15:25:22 -04:00
fujitsu
hisilicon format-security: move static strings to const 2017-05-08 17:15:14 -07:00
hp Annotate hardware config module parameters in drivers/net/ethernet/ 2017-04-20 12:02:32 +01:00
i825xx
ibm ibmvnic: Reset sub-crqs during driver reset 2017-05-26 15:32:47 -04:00
intel ixgbe: Resolve truncation warning for q_vector->name 2017-05-31 04:39:47 -07:00
marvell sky2: Use seq_puts() in sky2_debug_show() 2017-04-18 13:55:11 -04:00
mediatek Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-20 10:35:33 -04:00
mellanox Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-05-26 20:46:35 -04:00
micrel
microchip
moxa net: moxa: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
myricom
natsemi format-security: move static strings to const 2017-05-08 17:15:14 -07:00
neterion net: ethernet: update drivers to handle HWTSTAMP_FILTER_NTP_ALL 2017-05-21 13:37:32 -04:00
netronome nfp: don't keep count for free buffers delayed kick 2017-05-30 11:27:08 -04:00
nuvoton net: nuvoton: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
nvidia forcedeth: remove unnecessary carrier status check 2017-05-04 10:57:41 -04:00
nxp
oki-semi
packetengines
pasemi
qlogic qed: Cache alignemnt padding to match host 2017-05-30 12:07:04 -04:00
qualcomm net: qualcomm: add QCA7000 UART driver 2017-05-30 13:57:32 -04:00
rdc
realtek Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
renesas sh_eth: Do not print an error message for probe deferral 2017-05-18 11:21:07 -04:00
rocker Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-04-06 08:24:51 -07:00
samsung net: ethernet: update drivers to make both SW and HW TX timestamps 2017-05-21 13:37:32 -04:00
seeq
sfc net: ethernet: update drivers to handle HWTSTAMP_FILTER_NTP_ALL 2017-05-21 13:37:32 -04:00
sgi
silan
sis
smsc Annotation of module parameters that specify device settings 2017-05-10 19:13:03 -07:00
stmicro net-next: stmmac: rework the speed selection 2017-05-25 13:08:35 -04:00
sun ldmvsw: stop the clean timer at beginning of remove 2017-05-15 15:36:08 -04:00
synopsys net: dwc-xlgmac: add the initial ethtool support 2017-04-13 13:46:38 -04:00
tehuti
ti net: ethernet: update drivers to handle HWTSTAMP_FILTER_NTP_ALL 2017-05-21 13:37:32 -04:00
tile net: ethernet: update drivers to handle HWTSTAMP_FILTER_NTP_ALL 2017-05-21 13:37:32 -04:00
toshiba format-security: move static strings to const 2017-05-08 17:15:14 -07:00
tundra
via
wiznet net: ethernet: wiznet: avoid format string exposure 2017-04-06 13:38:11 -07:00
xilinx
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c net: jme: Remove unused functions 2017-05-25 12:58:45 -04:00
jme.h
Kconfig
korina.c
lantiq_etop.c
Makefile
netx-eth.c