Commit 428d865f authored by Kees Cook's avatar Kees Cook Committed by Greg Kroah-Hartman
Browse files

watchdog: exar: Shorten identity name to fit correctly



[ Upstream commit 8e28276a ]

The static initializer for struct watchdog_info::identity is too long
and gets initialized without a trailing NUL byte. Since the length
of "identity" is part of UAPI and tied to ioctls, just shorten
the name of the device. Avoids the warning seen with GCC 15's
-Wunterminated-string-initialization option:

drivers/watchdog/exar_wdt.c:224:27: warning: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (33 chars into 32 available) [-Wunterminated-string-initialization]
  224 |         .identity       = "Exar/MaxLinear XR28V38x Watchdog",
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 81126222 ("watchdog: Exar/MaxLinear XR28V38x driver")
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20250415225246.work.458-kees@kernel.org


Signed-off-by: default avatarKees Cook <kees@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 701340a2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment