HID: wacom: convert sysfs sprintf/snprintf family to sysfs_emit
Subsystems (2)
PATCH 1/1 HID: wacom: convert sysfs sprintf/snprintf family to sysfs_emit
Fix the following coccicheck warning:
./drivers/hid/wacom_sys.c:1828:8-16: WARNING: use scnprintf or sprintf.
Reported-by Abaci Robot<[email protected]>
Signed-off-by Jiapeng Chong <[email protected]>
--- drivers/hid/wacom_sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/wacom_sys.c +1 -1
@@ -1825,7 +1825,7 @@ static ssize_t wacom_show_speed(struct device *dev,struct hid_device *hdev =to_hid_device (dev);struct wacom *wacom =hid_get_drvdata (hdev); -return snprintf (buf,PAGE_SIZE ,"%i\n" , wacom->wacom_wac.bt_high_speed); +return sysfs_emit (buf,"%i\n" , wacom->wacom_wac.bt_high_speed); } static ssize_t wacom_store_speed(struct device *dev,
Signature · 1 line
1.8.3.1
Quoted 15 lines · Jiapeng Chong
Fix the following coccicheck warning:
./drivers/hid/wacom_sys.c:1828:8-16: WARNING: use scnprintf or sprintf.
Reported-by Abaci Robot<[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- drivers/hid/wacom_sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hid/wacom_sys.c +0
-0
drivers/hid/wacom_sys.c static ssize_t wacom_show_speed(struct device *dev, · line 1829
Quoted 6 lines
drivers/hid/wacom_sys.c +1
-1@@ -1825,7 +1825,7 @@ static ssize_t wacom_show_speed(struct device *dev,struct hid_device *hdev =to_hid_device (dev);struct wacom *wacom =hid_get_drvdata (hdev); -return snprintf (buf,PAGE_SIZE ,"%i\n" , wacom->wacom_wac.bt_high_speed); +return sysfs_emit (buf,"%i\n" , wacom->wacom_wac.bt_high_speed); }
Applied, thanks.
Signature · 2 lines
Jiri Kosina SUSE Labs