summaryrefslogtreecommitdiffstats
path: root/drivers/usb/wusbcore/wusbhc.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2019-02-28 20:38:16 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-01 20:53:41 +0100
commit1c7cf3d5e1c181caca75012b65252288c18a25f2 (patch)
tree009fb9d944d2218c439edb8c51dc2ea1cfd217c3 /drivers/usb/wusbcore/wusbhc.c
parent5d5d44dec7270e06c74b2f83ebca1fc081971862 (diff)
downloadlinux-1c7cf3d5e1c181caca75012b65252288c18a25f2.tar.bz2
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/wusbhc.c')
-rw-r--r--drivers/usb/wusbcore/wusbhc.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/usb/wusbcore/wusbhc.c b/drivers/usb/wusbcore/wusbhc.c
index e5ba6140c1ba..d0b404d258e8 100644
--- a/drivers/usb/wusbcore/wusbhc.c
+++ b/drivers/usb/wusbcore/wusbhc.c
@@ -80,17 +80,13 @@ static ssize_t wusb_chid_show(struct device *dev,
{
struct wusbhc *wusbhc = usbhc_dev_to_wusbhc(dev);
const struct wusb_ckhdid *chid;
- ssize_t result = 0;
if (wusbhc->wuie_host_info != NULL)
chid = &wusbhc->wuie_host_info->CHID;
else
chid = &wusb_ckhdid_zero;
- result += ckhdid_printf(buf, PAGE_SIZE, chid);
- result += sprintf(buf + result, "\n");
-
- return result;
+ return sprintf(buf, "%16ph\n", chid->data);
}
/*