wifi: ipw2x00: fix format-truncation warnings
authorKalle Valo <kvalo@kernel.org>
Thu, 12 Oct 2023 13:58:53 +0000 (16:58 +0300)
committerKalle Valo <kvalo@kernel.org>
Mon, 23 Oct 2023 17:24:39 +0000 (20:24 +0300)
commitc253e43e10783f0cf2da330ccf48fa7e96346234
tree2dd2c9ae24845a299ff6b6e5e378a22799c1a00e
parentfab22496c9827b46b83833d4eb2c7c923502c78b
wifi: ipw2x00: fix format-truncation warnings

On v6.6-rc4 with GCC 13.2 I see:

drivers/net/wireless/intel/ipw2x00/ipw2100.c:5905:63: warning: '%s' directive output may be truncated writing up to 63 bytes into a region of size 32 [-Wformat-truncation=]
drivers/net/wireless/intel/ipw2x00/ipw2100.c:5905:9: note: 'snprintf' output between 4 and 140 bytes into a destination of size 32
drivers/net/wireless/intel/ipw2x00/ipw2200.c:10392:63: warning: '%s' directive output may be truncated writing up to 63 bytes into a region of size 32 [-Wformat-truncation=]
drivers/net/wireless/intel/ipw2x00/ipw2200.c:10392:9: note: 'snprintf' output between 4 and 98 bytes into a destination of size 32

Fix this by copying only the firmware version and not providing any extra
information via ethtool. This is an ancient driver anyway and most likely
removed soon so it doesn't really matter.

Compile tested only.

Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20231012135854.3473332-2-kvalo@kernel.org
drivers/net/wireless/intel/ipw2x00/ipw2100.c
drivers/net/wireless/intel/ipw2x00/ipw2200.c