[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211117121829.11141-1-guozhengkui@vivo.com>
Date: Wed, 17 Nov 2021 20:17:44 +0800
From: Guo Zhengkui <guozhengkui@...o.com>
To: "Gustavo A. R. Silva" <gustavoars@...nel.org>,
Sam Ravnborg <sam@...nborg.org>,
Guo Zhengkui <guozhengkui@...o.com>,
linux-fbdev@...r.kernel.org (open list:OMAP FRAMEBUFFER SUPPORT),
linux-omap@...r.kernel.org (open list:OMAP FRAMEBUFFER SUPPORT),
dri-devel@...ts.freedesktop.org (open list:FRAMEBUFFER LAYER),
linux-kernel@...r.kernel.org (open list)
Cc: kernel@...o.com
Subject: [PATCH] video: omapfb: Use scnprintf() instead of snprintf()
Fix following warnings:
./drivers/video/fbdev/omap/omapfb_main.c:1382:8-16:
WARNING: use scnprintf or sprintf
./drivers/video/fbdev/omap/omapfb_main.c:1306:8-16:
WARNING: use scnprintf or sprintf
Signed-off-by: Guo Zhengkui <guozhengkui@...o.com>
---
drivers/video/fbdev/omap/omapfb_main.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c
index b495c09e6102..a0d472943c60 100644
--- a/drivers/video/fbdev/omap/omapfb_main.c
+++ b/drivers/video/fbdev/omap/omapfb_main.c
@@ -1303,7 +1303,7 @@ static ssize_t omapfb_show_panel_name(struct device *dev,
{
struct omapfb_device *fbdev = dev_get_drvdata(dev);
- return snprintf(buf, PAGE_SIZE, "%s\n", fbdev->panel->name);
+ return scnprintf(buf, PAGE_SIZE, "%s\n", fbdev->panel->name);
}
static ssize_t omapfb_show_bklight_level(struct device *dev,
@@ -1314,7 +1314,7 @@ static ssize_t omapfb_show_bklight_level(struct device *dev,
int r;
if (fbdev->panel->get_bklight_level) {
- r = snprintf(buf, PAGE_SIZE, "%d\n",
+ r = scnprintf(buf, PAGE_SIZE, "%d\n",
fbdev->panel->get_bklight_level(fbdev->panel));
} else
r = -ENODEV;
@@ -1348,7 +1348,7 @@ static ssize_t omapfb_show_bklight_max(struct device *dev,
int r;
if (fbdev->panel->get_bklight_level) {
- r = snprintf(buf, PAGE_SIZE, "%d\n",
+ r = scnprintf(buf, PAGE_SIZE, "%d\n",
fbdev->panel->get_bklight_max(fbdev->panel));
} else
r = -ENODEV;
@@ -1379,7 +1379,7 @@ static ssize_t omapfb_show_ctrl_name(struct device *dev,
{
struct omapfb_device *fbdev = dev_get_drvdata(dev);
- return snprintf(buf, PAGE_SIZE, "%s\n", fbdev->ctrl->name);
+ return scnprintf(buf, PAGE_SIZE, "%s\n", fbdev->ctrl->name);
}
static struct device_attribute dev_attr_ctrl_name =
--
2.20.1
Powered by blists - more mailing lists