summaryrefslogtreecommitdiff
path: root/drivers/usb/usbip
diff options
context:
space:
mode:
authorXuezhi Zhang <zhangxuezhi1@coolpad.com>2022-10-14 14:06:06 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-10-22 14:21:23 +0300
commit27ef01e381c777521084724248c5736cd1cdda63 (patch)
tree6c8d5469f58d8f2348cbe455bc5c811e4f5b28f2 /drivers/usb/usbip
parent13cc02f115d010d078851fac7f347890e62c097d (diff)
downloadlinux-27ef01e381c777521084724248c5736cd1cdda63.tar.xz
usbip: convert sysfs snprintf to sysfs_emit
Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: Xuezhi Zhang <zhangxuezhi1@coolpad.com> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Link: https://lore.kernel.org/r/20221014110606.599352-1-zhangxuezhi3@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/usbip')
-rw-r--r--drivers/usb/usbip/stub_dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/usbip/stub_dev.c b/drivers/usb/usbip/stub_dev.c
index 3c6d452e3bf4..f92047d860f0 100644
--- a/drivers/usb/usbip/stub_dev.c
+++ b/drivers/usb/usbip/stub_dev.c
@@ -30,7 +30,7 @@ static ssize_t usbip_status_show(struct device *dev,
status = sdev->ud.status;
spin_unlock_irq(&sdev->ud.lock);
- return snprintf(buf, PAGE_SIZE, "%d\n", status);
+ return sysfs_emit(buf, "%d\n", status);
}
static DEVICE_ATTR_RO(usbip_status);