lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 18 Oct 2022 08:44:16 +0200
From:   Helge Deller <deller@....de>
To:     Xuezhi Zhang <zhangxuezhi3@...il.com>, zhangxuezhi1@...lpad.com,
        wsa+renesas@...g-engineering.com
Cc:     linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] video: fbdev: sm501fb: onvert sysfs snprintf to
 sysfs_emit

On 10/18/22 08:25, Xuezhi Zhang wrote:
> From: Xuezhi Zhang <zhangxuezhi1@...lpad.com>
>
> Follow the advice of the Documentation/filesystems/sysfs.rst
> and show() should only use sysfs_emit() or sysfs_emit_at()
> when formatting the value to be returned to user space.
>
> Signed-off-by: Xuezhi Zhang <zhangxuezhi1@...lpad.com>

applied.
Thanks!
Helge

> ---
>   drivers/video/fbdev/sm501fb.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/sm501fb.c b/drivers/video/fbdev/sm501fb.c
> index fce6cfbadfd6..f743bfbde2a6 100644
> --- a/drivers/video/fbdev/sm501fb.c
> +++ b/drivers/video/fbdev/sm501fb.c
> @@ -1166,7 +1166,7 @@ static ssize_t sm501fb_crtsrc_show(struct device *dev,
>   	ctrl = smc501_readl(info->regs + SM501_DC_CRT_CONTROL);
>   	ctrl &= SM501_DC_CRT_CONTROL_SEL;
>
> -	return snprintf(buf, PAGE_SIZE, "%s\n", ctrl ? "crt" : "panel");
> +	return sysfs_emit(buf, "%s\n", ctrl ? "crt" : "panel");
>   }
>
>   /* sm501fb_crtsrc_show

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ