linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/malidp: convert sysfs snprintf to sysfs_emit
@ 2022-04-17 13:29 Xuezhi Zhang
  2022-04-19 11:14 ` Liviu Dudau
  0 siblings, 1 reply; 3+ messages in thread
From: Xuezhi Zhang @ 2022-04-17 13:29 UTC (permalink / raw)
  To: liviu.dudau, brian.starkey, airlied, daniel
  Cc: dri-devel, linux-kernel, Xuezhi Zhang

Fix the following coccicheck warning:
drivers/gpu/drm/arm/malidp_drv.c:658:8-16:
WARNING: use scnprintf or sprintf

Signed-off-by: Xuezhi Zhang <zhangxuezhi1@coolpad.com>
---
 drivers/gpu/drm/arm/malidp_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c
index d5aef21426cf..b1ffd5ba27d9 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);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [PATCH] drm/malidp: convert sysfs snprintf to sysfs_emit
@ 2021-06-07 13:39 Xuezhi Zhang
  0 siblings, 0 replies; 3+ messages in thread
From: Xuezhi Zhang @ 2021-06-07 13:39 UTC (permalink / raw)
  To: liviu.dudau, brian.starkey, airlied, daniel
  Cc: dri-devel, linux-kernel, Xuezhi Zhang

From: Xuezhi Zhang <zhangxuezhi1@yulong.com>

Fix the following coccicheck warning:
drivers/gpu/drm/arm/malidp_drv.c:657:8-16:
WARNING: use scnprintf or sprintf

Signed-off-by: Xuezhi Zhang <zhangxuezhi1@yulong.com>
---
 drivers/gpu/drm/arm/malidp_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c
index de59f3302516..d1af23f0704d 100644
--- a/drivers/gpu/drm/arm/malidp_drv.c
+++ b/drivers/gpu/drm/arm/malidp_drv.c
@@ -654,7 +654,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);
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-19 11:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-17 13:29 [PATCH] drm/malidp: convert sysfs snprintf to sysfs_emit Xuezhi Zhang
2022-04-19 11:14 ` Liviu Dudau
  -- strict thread matches above, loose matches on Subject: below --
2021-06-07 13:39 Xuezhi Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).