drm: bridge: convert sysfs sprintf/snprintf family to sysfs_emit
Subsystems (3)
PATCH 1/1 drm: bridge: convert sysfs sprintf/snprintf family to sysfs_emit
Fix the following coccicheck warning:
drivers/gpu/drm/bridge/lontium-lt9611uxc.c:858:8-16: WARNING: use scnprintf or sprintf.
--- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/lontium-lt9611uxc.c +1 -1
@@ -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);
Signature · 6 lines
1.8.3.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hey Jiapeng,
Thanks for the patch. Feel free to add my r-b.
Quoted 26 lines · Jiapeng Chong
Fix the following coccicheck warning:
drivers/gpu/drm/bridge/lontium-lt9611uxc.c:858:8-16: WARNING: use scnprintf or sprintf.
Reported-by Abaci Robot<[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/bridge/lontium-lt9611uxc.c +1
-2@@ -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); --
Quoted 2 lines
1.8.3.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Robert Foss
AppliedPushed to drm-misc-next
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=fffa69aa6b1c89853cd00dea969e4754633596d7
Quoted 26 lines · Jiapeng Chong
Fix the following coccicheck warning:
drivers/gpu/drm/bridge/lontium-lt9611uxc.c:858:8-16: WARNING: use scnprintf or sprintf.
Reported-by Abaci Robot<[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/bridge/lontium-lt9611uxc.c +1
-2@@ -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); --
Quoted 2 lines
1.8.3.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel