diff mbox series

drm/malidp: Convert sysfs sprintf/snprintf family to sysfs_emit

Message ID 1616568864-14463-1-git-send-email-tiantao6@hisilicon.com (mailing list archive)
State New, archived
Headers show
Series drm/malidp: Convert sysfs sprintf/snprintf family to sysfs_emit | expand

Commit Message

tiantao (H) March 24, 2021, 6:54 a.m. UTC
Fix the following coccicheck warning:
drivers/gpu//drm/arm/malidp_drv.c:658:8-16: WARNING: use scnprintf or
sprintf

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
 drivers/gpu/drm/arm/malidp_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c
index d83c736..b4ad0f2 100644
--- a/drivers/gpu/drm/arm/malidp_drv.c
+++ b/drivers/gpu/drm/arm/malidp_drv.c
@@ -655,7 +655,7 @@  static ssize_t core_id_show(struct device *dev, struct device_attribute *attr,
 	struct drm_device *drm = dev_get_drvdata(dev);
 	struct malidp_drm *malidp = drm->dev_private;
 
-	return snprintf(buf, PAGE_SIZE, "%08x\n", malidp->core_id);
+	return sysfs_emit(buf, "%08x\n", malidp->core_id);
 }
 
 static DEVICE_ATTR_RO(core_id);