]> git.hungrycats.org Git - linux/commit
enetc: avoid truncating error message
authorArnd Bergmann <arnd@arndb.de>
Tue, 26 Mar 2024 22:38:01 +0000 (23:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2024 07:49:07 +0000 (09:49 +0200)
commit2647dfe5331478218df8b15e79808f8319ea409a
tree67c01d2bd4b517d1758f4d9c3fb3231de9530670
parent77e84073e0cc8613a8a07898a19bd4087ba69089
enetc: avoid truncating error message

[ Upstream commit 9046d581ed586f3c715357638ca12c0e84402002 ]

As clang points out, the error message in enetc_setup_xdp_prog()
still does not fit in the buffer and will be truncated:

drivers/net/ethernet/freescale/enetc/enetc.c:2771:3: error: 'snprintf' will always be truncated; specified size is 80, but format string expands to at least 87 [-Werror,-Wformat-truncation]

Replace it with an even shorter message that should fit.

Fixes: f968c56417f0 ("net: enetc: shorten enetc_setup_xdp_prog() error message to fit NETLINK_MAX_FMTMSG_LEN")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240326223825.4084412-3-arnd@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/freescale/enetc/enetc.c