diff options
author | Xuezhi Zhang <zhangxuezhi1@coolpad.com> | 2022-07-27 15:44:15 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-27 15:48:14 +0300 |
commit | e0c6b1f3d7574dea3bec7deb18578e896d2cfaa2 (patch) | |
tree | 54c72cf8c0f55375558966f4d570e2e52dffb06c /drivers/usb | |
parent | 40e58a8a7ca6ac7f03a5fbfdbc0119fc0caaa072 (diff) | |
download | linux-e0c6b1f3d7574dea3bec7deb18578e896d2cfaa2.tar.xz |
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/misc/usbsevseg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/misc/usbsevseg.c b/drivers/usb/misc/usbsevseg.c index 4bc816bb09bb..c3114d9bd128 100644 --- a/drivers/usb/misc/usbsevseg.c +++ b/drivers/usb/misc/usbsevseg.c @@ -167,7 +167,7 @@ static ssize_t text_show(struct device *dev, struct usb_interface *intf = to_usb_interface(dev); struct usb_sevsegdev *mydev = usb_get_intfdata(intf); - return snprintf(buf, mydev->textlength, "%s\n", mydev->text); + return sysfs_emit(buf, "%s\n", mydev->text); } static ssize_t text_store(struct device *dev, |