[PATCH] drm/bridge/lontium-lt9611uxc: Convert sysfs sprintf/snprintf family to sysfs_emit

Tian Tao tiantao6 at hisilicon.com
Tue Mar 23 03:06:18 UTC 2021


Fix the following coccicheck warning:
drivers/gpu//drm/bridge/lontium-lt9611uxc.c:858:8-16: WARNING: use
scnprintf or sprintf

Signed-off-by: Tian Tao <tiantao6 at hisilicon.com>
---
 drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
index fee2795..3cac16d 100644
--- a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
+++ b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
@@ -855,7 +855,7 @@ static ssize_t lt9611uxc_firmware_show(struct device *dev, struct device_attribu
 {
 	struct lt9611uxc *lt9611uxc = dev_get_drvdata(dev);
 
-	return snprintf(buf, PAGE_SIZE, "%02x\n", lt9611uxc->fw_version);
+	return sysfs_emit(buf, "%02x\n", lt9611uxc->fw_version);
 }
 
 static DEVICE_ATTR_RW(lt9611uxc_firmware);
-- 
2.7.4



More information about the dri-devel mailing list