[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210408083118.557966-1-llyz108@163.com>
Date: Thu, 8 Apr 2021 08:31:18 +0000
From: Carlis <llyz108@....com>
To: thierry.reding@...il.com, sam@...nborg.org, airlied@...ux.ie,
daniel@...ll.ch
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
Xuezhi Zhang <zhangxuezhi1@...ong.com>
Subject: [PATCH] drm/panel: tpo-td043mtea1: convert sysfs snprintf to sysfs_emit
From: Xuezhi Zhang <zhangxuezhi1@...ong.com>
Fix the following coccicheck warning:
drivers/gpu/drm//panel/panel-tpo-td043mtea1.c:217:8-16:
WARNING: use scnprintf or sprintf
drivers/gpu/drm//panel/panel-tpo-td043mtea1.c:189:8-16:
WARNING: use scnprintf or sprintf
Signed-off-by: Xuezhi Zhang <zhangxuezhi1@...ong.com>
---
drivers/gpu/drm/panel/panel-tpo-td043mtea1.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-tpo-td043mtea1.c b/drivers/gpu/drm/panel/panel-tpo-td043mtea1.c
index 49e6c9386258..bacaf1b7fb70 100644
--- a/drivers/gpu/drm/panel/panel-tpo-td043mtea1.c
+++ b/drivers/gpu/drm/panel/panel-tpo-td043mtea1.c
@@ -186,7 +186,7 @@ static ssize_t vmirror_show(struct device *dev, struct device_attribute *attr,
{
struct td043mtea1_panel *lcd = dev_get_drvdata(dev);
- return snprintf(buf, PAGE_SIZE, "%d\n", lcd->vmirror);
+ return sysfs_emit(buf, "%d\n", lcd->vmirror);
}
static ssize_t vmirror_store(struct device *dev, struct device_attribute *attr,
@@ -214,7 +214,7 @@ static ssize_t mode_show(struct device *dev, struct device_attribute *attr,
{
struct td043mtea1_panel *lcd = dev_get_drvdata(dev);
- return snprintf(buf, PAGE_SIZE, "%d\n", lcd->mode);
+ return sysfs_emit(buf, "%d\n", lcd->mode);
}
static ssize_t mode_store(struct device *dev, struct device_attribute *attr,
--
2.25.1
Powered by blists - more mailing lists