From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Jing Yao <yao.jing2@zte.com.cn>, Zeal Robot <zealci@zte.com.cn>,
Helge Deller <deller@gmx.de>, Sasha Levin <sashal@kernel.org>,
tomi.valkeinen@ti.com, linux-omap@vger.kernel.org,
linux-fbdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.15 26/50] video: fbdev: omapfb: panel-tpo-td043mtea1: Use sysfs_emit() instead of snprintf()
Date: Wed, 30 Mar 2022 07:49:40 -0400 [thread overview]
Message-ID: <20220330115005.1671090-26-sashal@kernel.org> (raw)
In-Reply-To: <20220330115005.1671090-1-sashal@kernel.org>
From: Jing Yao <yao.jing2@zte.com.cn>
[ Upstream commit c07a039cbb96748f54c02995bae8131cc9a73b0a ]
Use sysfs_emit instead of scnprintf, snprintf or sprintf.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jing Yao <yao.jing2@zte.com.cn>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
index afac1d9445aa..57b7d1f49096 100644
--- a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
+++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
@@ -169,7 +169,7 @@ static ssize_t tpo_td043_vmirror_show(struct device *dev,
{
struct panel_drv_data *ddata = dev_get_drvdata(dev);
- return snprintf(buf, PAGE_SIZE, "%d\n", ddata->vmirror);
+ return sysfs_emit(buf, "%d\n", ddata->vmirror);
}
static ssize_t tpo_td043_vmirror_store(struct device *dev,
@@ -199,7 +199,7 @@ static ssize_t tpo_td043_mode_show(struct device *dev,
{
struct panel_drv_data *ddata = dev_get_drvdata(dev);
- return snprintf(buf, PAGE_SIZE, "%d\n", ddata->mode);
+ return sysfs_emit(buf, "%d\n", ddata->mode);
}
static ssize_t tpo_td043_mode_store(struct device *dev,
--
2.34.1
next prev parent reply other threads:[~2022-03-30 11:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220330115005.1671090-1-sashal@kernel.org>
2022-03-30 11:49 ` [PATCH AUTOSEL 5.15 13/50] video: fbdev: nvidiafb: Use strscpy() to prevent buffer overflow Sasha Levin
2022-03-30 11:49 ` [PATCH AUTOSEL 5.15 14/50] video: fbdev: w100fb: Reset global state Sasha Levin
2022-03-30 11:49 ` [PATCH AUTOSEL 5.15 15/50] video: fbdev: cirrusfb: check pixclock to avoid divide by zero Sasha Levin
2022-03-30 11:49 ` [PATCH AUTOSEL 5.15 16/50] video: fbdev: omapfb: acx565akm: replace snprintf with sysfs_emit Sasha Levin
2022-03-30 11:49 ` [PATCH AUTOSEL 5.15 25/50] video: fbdev: omapfb: panel-dsi-cm: Use sysfs_emit() instead of snprintf() Sasha Levin
2022-03-30 11:49 ` Sasha Levin [this message]
2022-03-30 11:49 ` [PATCH AUTOSEL 5.15 27/50] video: fbdev: udlfb: replace snprintf in show functions with sysfs_emit Sasha Levin
2022-03-30 11:49 ` [PATCH AUTOSEL 5.15 41/50] video: fbdev: sm712fb: Fix crash in smtcfb_write() Sasha Levin
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=20220330115005.1671090-26-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=deller@gmx.de \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tomi.valkeinen@ti.com \
--cc=yao.jing2@zte.com.cn \
--cc=zealci@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).