]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
fbdev: shmobile: fix snprintf truncation
authorArnd Bergmann <arnd@arndb.de>
Tue, 26 Mar 2024 22:38:00 +0000 (23:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Jun 2024 11:39:27 +0000 (13:39 +0200)
[ Upstream commit 26c8cfb9d1e4b252336d23dd5127a8cbed414a32 ]

The name of the overlay does not fit into the fixed-length field:

drivers/video/fbdev/sh_mobile_lcdcfb.c:1577:2: error: 'snprintf' will always be truncated; specified size is 16, but format string expands to at least 25

Make it short enough by changing the string.

Fixes: c5deac3c9b22 ("fbdev: sh_mobile_lcdc: Implement overlays support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/video/fbdev/sh_mobile_lcdcfb.c

index e33c016c5428c6279c82280368b77e96985c448e..74a013c398b14dcfe0c8dad6143e1e912cc609c4 100644 (file)
@@ -1577,7 +1577,7 @@ sh_mobile_lcdc_overlay_fb_init(struct sh_mobile_lcdc_overlay *ovl)
         */
        info->fix = sh_mobile_lcdc_overlay_fix;
        snprintf(info->fix.id, sizeof(info->fix.id),
-                "SH Mobile LCDC Overlay %u", ovl->index);
+                "SHMobile ovl %u", ovl->index);
        info->fix.smem_start = ovl->dma_handle;
        info->fix.smem_len = ovl->fb_size;
        info->fix.line_length = ovl->pitch;