mtd: cfi: deinline large functions
authorDenys Vlasenko <dvlasenk@redhat.com>
Mon, 18 May 2015 10:58:40 +0000 (12:58 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 27 May 2015 19:42:16 +0000 (12:42 -0700)
commit4612c715a6ea6b3af2aee0163c0721375b2548d7
tree6ec1f9324fa54c41a0a93c5e607e4a0139fd13f5
parentc3c263a8a38c277e8867bfc7731ec95846a23b11
mtd: cfi: deinline large functions

With this .config: http://busybox.net/~vda/kernel_config,
after uninlining these functions have sizes and callsite counts
as follows:

cfi_udelay(): 74 bytes, 26 callsites
cfi_send_gen_cmd(): 153 bytes, 95 callsites
cfi_build_cmd(): 274 bytes, 123 callsites
cfi_build_cmd_addr(): 49 bytes, 15 callsites
cfi_merge_status(): 230 bytes, 3 callsites

Reduction in code size is about 50,000:

    text     data      bss       dec     hex filename
85842882 22294584 20627456 128764922 7accbfa vmlinux.before
85789648 22294616 20627456 128711720 7abfc28 vmlinux

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: Dan Carpenter <dan.carpenter@oracle.com>
CC: Jingoo Han <jg1.han@samsung.com>
CC: Brian Norris <computersforpeace@gmail.com>
CC: Aaron Sierra <asierra@xes-inc.com>
CC: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
CC: David Woodhouse <David.Woodhouse@intel.com>
CC: linux-mtd@lists.infradead.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/chips/cfi_util.c
include/linux/mtd/cfi.h