]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita33b372190c1d390612e0b0eb0da3ca5401cc2a4
tree07242b094efb9c306d7b825f70d9c1660ab95241
parent076f71ab184ad6d2daf5f1ebeb6f7e16cfce6773
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