drm/panel: Convert sysfs sprintf/snprintf family to sysfs_emit
Subsystems (3)
PATCH 1/1 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]>
--- drivers/gpu/drm/panel/panel-tpo-td043mtea1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/panel/panel-tpo-td043mtea1.c +2 -2
@@ -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,
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Tian Tao
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 sprintfSigned-off-by Tian Tao <[email protected]>
Reviewed-by Daniel Vetter <[email protected]>
Quoted 29 lines
--- drivers/gpu/drm/panel/panel-tpo-td043mtea1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/panel/panel-tpo-td043mtea1.c +2
-2@@ -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,Signature · 1 line
2.7.4
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel