Re: [PATCH 22/22] IB/mlx4: fix sprintf format warning

2017-07-14 Thread Leon Romanovsky
On Fri, Jul 14, 2017 at 02:07:14PM +0200, Arnd Bergmann wrote: > gcc-7 points out that a negative port_num value would overflow > the string buffer: > > drivers/infiniband/hw/mlx4/sysfs.c: In function > 'mlx4_ib_device_register_sysfs': > drivers/infiniband/hw/mlx4/sysfs.c:251:16: error: 'sprintf'

[PATCH 22/22] IB/mlx4: fix sprintf format warning

2017-07-14 Thread Arnd Bergmann
gcc-7 points out that a negative port_num value would overflow the string buffer: drivers/infiniband/hw/mlx4/sysfs.c: In function 'mlx4_ib_device_register_sysfs': drivers/infiniband/hw/mlx4/sysfs.c:251:16: error: 'sprintf' may write a terminating nul past the end of the destination [-Werror=forma