diff options
author | Joe Perches <joe@perches.com> | 2019-02-28 20:38:16 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-03-01 20:53:41 +0100 |
commit | 1c7cf3d5e1c181caca75012b65252288c18a25f2 (patch) | |
tree | 009fb9d944d2218c439edb8c51dc2ea1cfd217c3 /drivers/usb/wusbcore/dev-sysfs.c | |
parent | 5d5d44dec7270e06c74b2f83ebca1fc081971862 (diff) |
wusb: Remove unnecessary static function ckhdid_printf
This static inline is unnecessary and can be removed
by using the vsprintf %ph extension.
This reduces overall object size by more than 2K.
Reported-by: Louis Taylor <louis@kragniz.eu>
Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Louis Taylor <louis@kragniz.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/wusbcore/dev-sysfs.c')
-rw-r--r-- | drivers/usb/wusbcore/dev-sysfs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/wusbcore/dev-sysfs.c b/drivers/usb/wusbcore/dev-sysfs.c index 85a1acf3a729..67b0a4c412b2 100644 --- a/drivers/usb/wusbcore/dev-sysfs.c +++ b/drivers/usb/wusbcore/dev-sysfs.c @@ -50,10 +50,9 @@ static ssize_t wusb_cdid_show(struct device *dev, wusb_dev = wusb_dev_get_by_usb_dev(to_usb_device(dev)); if (wusb_dev == NULL) return -ENODEV; - result = ckhdid_printf(buf, PAGE_SIZE, &wusb_dev->cdid); - strcat(buf, "\n"); + result = sprintf(buf, "%16ph\n", wusb_dev->cdid.data); wusb_dev_put(wusb_dev); - return result + 1; + return result; } static DEVICE_ATTR_RO(wusb_cdid); |