wifi: ath9k_htc: fix format-truncation warning
authorKalle Valo <kvalo@kernel.org>
Thu, 12 Oct 2023 13:58:54 +0000 (16:58 +0300)
committerKalle Valo <kvalo@kernel.org>
Mon, 23 Oct 2023 17:24:40 +0000 (20:24 +0300)
commit359342795d62548f3ba4831914fccf20a24446b5
tree18cef59267a43b4702c8d71ae0ea8c24da066e17
parentc253e43e10783f0cf2da330ccf48fa7e96346234
wifi: ath9k_htc: fix format-truncation warning

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

drivers/net/wireless/ath/ath9k/hif_usb.c:1223:42: warning: '.0.fw' directive output may be truncated writing 5 bytes into a region of size between 4 and 11 [-Wformat-truncation=]
drivers/net/wireless/ath/ath9k/hif_usb.c:1222:17: note: 'snprintf' output between 27 and 34 bytes into a destination of size 32

Fix it by increasing the size of the fw_name field to 64 bytes.

Compile tested only.

Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20231012135854.3473332-3-kvalo@kernel.org
drivers/net/wireless/ath/ath9k/hif_usb.h