Skip to content

Commit e8b8b0d

Browse files
author
Tian Tao
committed
drm/panel: Convert sysfs sprintf/snprintf family to sysfs_emit
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: Tian Tao <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 90876fd commit e8b8b0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/panel/panel-tpo-td043mtea1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ static ssize_t vmirror_show(struct device *dev, struct device_attribute *attr,
186186
{
187187
struct td043mtea1_panel *lcd = dev_get_drvdata(dev);
188188

189-
return snprintf(buf, PAGE_SIZE, "%d\n", lcd->vmirror);
189+
return sysfs_emit(buf, "%d\n", lcd->vmirror);
190190
}
191191

192192
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,
214214
{
215215
struct td043mtea1_panel *lcd = dev_get_drvdata(dev);
216216

217-
return snprintf(buf, PAGE_SIZE, "%d\n", lcd->mode);
217+
return sysfs_emit(buf, "%d\n", lcd->mode);
218218
}
219219

220220
static ssize_t mode_store(struct device *dev, struct device_attribute *attr,

0 commit comments

Comments
 (0)