diff mbox series

video: omapfb: Use scnprintf() instead of snprintf()

Message ID 20211117121829.11141-1-guozhengkui@vivo.com
State Superseded
Headers show
Series video: omapfb: Use scnprintf() instead of snprintf() | expand

Commit Message

Guo Zhengkui Nov. 17, 2021, 12:17 p.m. UTC
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@vivo.com>
---
 drivers/video/fbdev/omap/omapfb_main.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

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 =