Skip to content

Commit

Permalink
drm: bridge: convert sysfs sprintf/snprintf family to sysfs_emit
Browse files Browse the repository at this point in the history
Fix the following coccicheck warning:

drivers/gpu/drm/bridge/lontium-lt9611uxc.c:858:8-16: WARNING: use
scnprintf or sprintf.

Reported-by: Abaci Robot<abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1612689000-64577-1-git-send-email-jiapeng.chong@linux.alibaba.com
  • Loading branch information
Jiapeng Chong authored and Robert Foss committed Mar 25, 2021
1 parent d1a9764 commit fffa69a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/bridge/lontium-lt9611uxc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fffa69a

Please sign in to comment.