From: Helge Deller <deller@gmx.de>
To: Xuezhi Zhang <zhangxuezhi3@gmail.com>,
zhangxuezhi1@coolpad.com, wsa+renesas@sang-engineering.com
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] video: fbdev: sm501fb: onvert sysfs snprintf to sysfs_emit
Date: Tue, 18 Oct 2022 08:44:16 +0200 [thread overview]
Message-ID: <b1a1e5b0-206c-6b3c-41f0-94de7b056f72@gmx.de> (raw)
In-Reply-To: <20221018062548.642910-1-zhangxuezhi3@gmail.com>
On 10/18/22 08:25, Xuezhi Zhang wrote:
> From: Xuezhi Zhang <zhangxuezhi1@coolpad.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@coolpad.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
prev parent reply other threads:[~2022-10-18 6:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 6:25 [PATCH] video: fbdev: sm501fb: onvert sysfs snprintf to sysfs_emit Xuezhi Zhang
2022-10-18 6:44 ` Helge Deller [this message]
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=b1a1e5b0-206c-6b3c-41f0-94de7b056f72@gmx.de \
--to=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa+renesas@sang-engineering.com \
--cc=zhangxuezhi1@coolpad.com \
--cc=zhangxuezhi3@gmail.com \
/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