linux_dsm_epyc7002/drivers/net/ethernet/sun
Arnd Bergmann 73066f6c53 net: niu: fix format string overflow warning:
We get a warning for the port_name string that might be longer than
six characters if we had more than 10 ports:

drivers/net/ethernet/sun/niu.c: In function 'niu_put_parent':
drivers/net/ethernet/sun/niu.c:9563:21: error: '%d' directive writing between 1 and 3 bytes into a region of size 2 [-Werror=format-overflow=]
  sprintf(port_name, "port%d", port);
                     ^~~~~~~~
drivers/net/ethernet/sun/niu.c:9563:21: note: directive argument in the range [0, 255]
drivers/net/ethernet/sun/niu.c:9563:2: note: 'sprintf' output between 6 and 8 bytes into a destination of size 6
  sprintf(port_name, "port%d", port);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/sun/niu.c: In function 'niu_pci_init_one':
drivers/net/ethernet/sun/niu.c:9538:22: error: '%d' directive writing between 1 and 3 bytes into a region of size 2 [-Werror=format-overflow=]
   sprintf(port_name, "port%d", port);
                      ^~~~~~~~
drivers/net/ethernet/sun/niu.c:9538:22: note: directive argument in the range [0, 255]
drivers/net/ethernet/sun/niu.c:9538:3: note: 'sprintf' output between 6 and 8 bytes into a destination of size 6

While we know that the port number is small, there is no harm in
making the format string two bytes longer to avoid the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-14 09:03:11 -07:00
..
cassini.c net: sun: cassini: use new api ethtool_{get|set}_link_ksettings 2017-03-08 22:18:05 -08:00
cassini.h ethernet: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
Kconfig sunvnet: make sunvnet common code dynamically loadable 2017-02-14 13:04:08 -05:00
ldmvsw.c sunvnet: restrict advertized checksum offloads to just IP 2017-06-15 14:22:43 -04:00
Makefile ldmvsw: Add ldmvsw.c driver code 2016-03-18 19:33:00 -04:00
niu.c net: niu: fix format string overflow warning: 2017-07-14 09:03:11 -07:00
niu.h
sunbmac.c net: sunbmac: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
sunbmac.h net: sunbmac: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
sungem.c net: sun: sungem: rix a possible null dereference 2017-03-21 17:44:46 -07:00
sungem.h
sunhme.c net: sunhme: fix spelling mistakes: "ParityErro" -> "ParityError" 2017-04-30 22:55:47 -04:00
sunhme.h net: sunhme: Use net_device_stats from struct net_device 2017-04-07 07:03:33 -07:00
sunqe.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-11-22 13:27:16 -05:00
sunqe.h sunqe: Fix compiler warnings 2016-11-18 11:18:26 -08:00
sunvnet_common.c sunvnet: xoff not needed when removing port link 2017-03-16 20:29:55 -07:00
sunvnet_common.h sunvnet: track port queues correctly 2017-03-16 20:29:54 -07:00
sunvnet.c sunvnet: restrict advertized checksum offloads to just IP 2017-06-15 14:22:43 -04:00