[PATCH] video: omapfb: Use scnprintf() instead of snprintf()
Geert Uytterhoeven
geert at linux-m68k.org
Thu Nov 18 08:33:46 UTC 2021
Hi Guo,
CC cocci
On Wed, Nov 17, 2021 at 1:58 PM Guo Zhengkui <guozhengkui at vivo.com> 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 <guozhengkui at vivo.com>
Thanks for your patch!
> --- 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 at 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
More information about the dri-devel
mailing list