Skip to content

Commit 8e28276

Browse files
committed
watchdog: exar: Shorten identity name to fit correctly
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: 8112622 ("watchdog: Exar/MaxLinear XR28V38x driver") Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/20250415225246.work.458-kees@kernel.org Signed-off-by: Kees Cook <kees@kernel.org>
1 parent 6558628 commit 8e28276

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/watchdog/exar_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ static const struct watchdog_info exar_wdt_info = {
221221
.options = WDIOF_KEEPALIVEPING |
222222
WDIOF_SETTIMEOUT |
223223
WDIOF_MAGICCLOSE,
224-
.identity = "Exar/MaxLinear XR28V38x Watchdog",
224+
.identity = "Exar XR28V38x Watchdog",
225225
};
226226

227227
static const struct watchdog_ops exar_wdt_ops = {

0 commit comments

Comments
 (0)