From: Han Jingoo <jingoohan1@gmail.com>
To: cgel.zte@gmail.com
Cc: lee@kernel.org, daniel.thompson@linaro.org, deller@gmx.de,
dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
ye xingchen <ye.xingchen@zte.com.cn>
Subject: Re: [PATCH linux-next] backlight: lp8788: use sysfs_emit() to instead of scnprintf()
Date: Fri, 23 Sep 2022 14:04:38 -0700 [thread overview]
Message-ID: <CAPOBaE6-GjJBPb4k0aM3w-xuL0ZEEqF2RYrjVu1+oHkH8ijAgQ@mail.gmail.com> (raw)
In-Reply-To: <20220923063533.239315-1-ye.xingchen@zte.com.cn>
On Thu, Sep 22, 2022 <cgel.zte@gmail.com> wrote:
>
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Replace the open-code with sysfs_emit() to simplify the code.
>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Acked-by: Jingoo Han <jingoohan1@gmail.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
next parent reply other threads:[~2022-09-23 21:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220923063533.239315-1-ye.xingchen@zte.com.cn>
2022-09-23 21:04 ` Han Jingoo [this message]
2022-09-26 13:27 ` [PATCH linux-next] backlight: lp8788: use sysfs_emit() to instead of scnprintf() Daniel Thompson
2022-09-26 18:49 ` Han Jingoo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPOBaE6-GjJBPb4k0aM3w-xuL0ZEEqF2RYrjVu1+oHkH8ijAgQ@mail.gmail.com \
--to=jingoohan1@gmail.com \
--cc=cgel.zte@gmail.com \
--cc=daniel.thompson@linaro.org \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=lee@kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ye.xingchen@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).