Skip to content

Commit e0c6b1f

Browse files
Xuezhi Zhanggregkh
authored andcommitted
USB: usbsevseg: convert sysfs snprintf to sysfs_emit
Fix the following coccincheck warning: drivers/usb/misc/usbsevseg.c:170:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Xuezhi Zhang <zhangxuezhi1@coolpad.com> Link: https://lore.kernel.org/r/20220727124415.8340-1-zhangxuezhi3@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 40e58a8 commit e0c6b1f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/usb/misc/usbsevseg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ static ssize_t text_show(struct device *dev,
167167
struct usb_interface *intf = to_usb_interface(dev);
168168
struct usb_sevsegdev *mydev = usb_get_intfdata(intf);
169169

170-
return snprintf(buf, mydev->textlength, "%s\n", mydev->text);
170+
return sysfs_emit(buf, "%s\n", mydev->text);
171171
}
172172

173173
static ssize_t text_store(struct device *dev,

0 commit comments

Comments
 (0)