USB: makes usb_endpoint_* functions inline.
authorLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Mon, 30 Oct 2006 17:53:03 +0000 (14:53 -0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Dec 2006 22:23:29 +0000 (14:23 -0800)
commit0c1ac4f25f894f9df0ffe9b912c165fb6a185a3c
tree07242b094efb9c306d7b825f70d9c1660ab95241
parent6f7cd44162ca1bffd54f4090e67b9810bacb5d25
USB: makes usb_endpoint_* functions inline.

We have no benefits of having the usb_endpoint_* functions as functions,
but making them inline saves text and data segment sizes:

text    data     bss     dec     hex filename
14893634 3108770 1108840 19111244 1239d4c vmlinux.func
14893185 3108566 1108840 19110591 1239abf vmlinux.inline

 This is the result of a 2.6.19-rc3 kernel compiled with GCC 4.1.1 without
CONFIG_MODULES, CONFIG_CC_OPTIMIZE_FOR_SIZE, CONFIG_REGPARM options set.
USB support is fully enabled (while most of the other drivers are not),
and that kernel has most of the USB code ported to use the endpoint
functions.

That happens because a call to those functions are expensive (in terms
of bytes), while the function's size is smaller or have the same 'size' of
the call.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/usb.c
include/linux/usb.h