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>] [day] [month] [year] [list]
Message-ID: <CAPOBaE6-GjJBPb4k0aM3w-xuL0ZEEqF2RYrjVu1+oHkH8ijAgQ@mail.gmail.com>
Date:   Fri, 23 Sep 2022 14:04:38 -0700
From:   Han Jingoo <jingoohan1@...il.com>
To:     cgel.zte@...il.com
Cc:     lee@...nel.org, daniel.thompson@...aro.org, deller@....de,
        dri-devel@...ts.freedesktop.org, linux-fbdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, ye xingchen <ye.xingchen@....com.cn>
Subject: Re: [PATCH linux-next] backlight: lp8788: use sysfs_emit() to instead
 of scnprintf()

On Thu, Sep 22, 2022 <cgel.zte@...il.com> wrote:
>
> From: ye xingchen <ye.xingchen@....com.cn>
>
> Replace the open-code with sysfs_emit() to simplify the code.
>
> Signed-off-by: ye xingchen <ye.xingchen@....com.cn>

Acked-by: Jingoo Han <jingoohan1@...il.com>

Best regards,
Jingoo Han


> ---
>  drivers/video/backlight/lp8788_bl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/backlight/lp8788_bl.c b/drivers/video/backlight/lp8788_bl.c
> index ba42f3fe0c73..00d79c0cfee9 100644
> --- a/drivers/video/backlight/lp8788_bl.c
> +++ b/drivers/video/backlight/lp8788_bl.c
> @@ -240,7 +240,7 @@ static ssize_t lp8788_get_bl_ctl_mode(struct device *dev,
>         else
>                 strmode = "Invalid mode";
>
> -       return scnprintf(buf, PAGE_SIZE, "%s\n", strmode);
> +       return sysfs_emit(buf, "%s\n", strmode);
>  }
>
>  static DEVICE_ATTR(bl_ctl_mode, S_IRUGO, lp8788_get_bl_ctl_mode, NULL);
> --
> 2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ