]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
qed: avoid truncating work queue length
authorArnd Bergmann <arnd@arndb.de>
Tue, 26 Mar 2024 22:38:02 +0000 (23:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2024 07:49:07 +0000 (09:49 +0200)
commit479e904c6c5590453afe38c80b759b72fb34b2b4
tree33712bcd93911377ce038512ab49803a1254c9b6
parent2647dfe5331478218df8b15e79808f8319ea409a
qed: avoid truncating work queue length

[ Upstream commit 954fd908f177604d4cce77e2a88cc50b29bad5ff ]

clang complains that the temporary string for the name passed into
alloc_workqueue() is too short for its contents:

drivers/net/ethernet/qlogic/qed/qed_main.c:1218:3: error: 'snprintf' will always be truncated; specified size is 16, but format string expands to at least 18 [-Werror,-Wformat-truncation]

There is no need for a temporary buffer, and the actual name of a workqueue
is 32 bytes (WQ_NAME_LEN), so just use the interface as intended to avoid
the truncation.

Fixes: 59ccf86fe69a ("qed: Add driver infrastucture for handling mfw requests.")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240326223825.4084412-4-arnd@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/qlogic/qed/qed_main.c