Thread (3 messages) 3 messages, 2 authors, 2021-11-18

Re: [PATCH] video: omapfb: Use scnprintf() instead of snprintf()

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2021-11-18 08:34:06
Also in: cocci, dri-devel, linux-omap, lkml

Hi Guo,

CC cocci

On Wed, Nov 17, 2021 at 1:58 PM Guo Zhengkui [off-list ref] wrote:
Fix following warnings:
./drivers/video/fbdev/omap/omapfb_main.c:1382:8-16:
WARNING: use scnprintf or sprintf
./drivers/video/fbdev/omap/omapfb_main.c:1306:8-16:
WARNING: use scnprintf or sprintf

Signed-off-by: Guo Zhengkui <redacted>
Thanks for your patch!
quoted hunk ↗ jump to hunk
--- a/drivers/video/fbdev/omap/omapfb_main.c
+++ b/drivers/video/fbdev/omap/omapfb_main.c
@@ -1303,7 +1303,7 @@ static ssize_t omapfb_show_panel_name(struct device *dev,
 {
        struct omapfb_device *fbdev = dev_get_drvdata(dev);

-       return snprintf(buf, PAGE_SIZE, "%s\n", fbdev->panel->name);
+       return scnprintf(buf, PAGE_SIZE, "%s\n", fbdev->panel->name);
 }
I guess all of these should use sysfs_emit() instead.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help