diff mbox series

staging: fbtft: convert sysfs snprintf to sysfs_emit

Message ID 20210403140722.169623-1-llyz108@163.com (mailing list archive)
State New
Headers show
Series staging: fbtft: convert sysfs snprintf to sysfs_emit | expand

Commit Message

Carlis April 3, 2021, 2:07 p.m. UTC
From: Xuezhi Zhang <zhangxuezhi1@yulong.com>

Fix the following coccicheck warning:
WARNING: use scnprintf or sprintf

Signed-off-by: Xuezhi Zhang <zhangxuezhi1@yulong.com>
 drivers/staging/fbtft/fbtft-sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/drivers/staging/fbtft/fbtft-sysfs.c b/drivers/staging/fbtft/fbtft-sysfs.c
index 26e52cc2d..39e8d2806 100644
--- a/drivers/staging/fbtft/fbtft-sysfs.c
+++ b/drivers/staging/fbtft/fbtft-sysfs.c
@@ -199,7 +199,7 @@  static ssize_t show_debug(struct device *device,
 	struct fb_info *fb_info = dev_get_drvdata(device);
 	struct fbtft_par *par = fb_info->par;
-	return snprintf(buf, PAGE_SIZE, "%lu\n", par->debug);
+	return sysfs_emit(buf, "%lu\n", par->debug);
 static struct device_attribute debug_device_attr =