lkml.org 
[lkml]   [2021]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] video: omapfb: Use scnprintf() instead of snprintf()
Hi Guo,

CC cocci

On Wed, Nov 17, 2021 at 1:58 PM Guo Zhengkui <guozhengkui@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@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@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

\
 
 \ /
  Last update: 2021-11-18 09:34    [W:0.038 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site