]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: reduce object size when !CONFIG_PRINTK
authorJoe Perches <joe@perches.com>
Tue, 18 Jun 2013 15:13:59 +0000 (11:13 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 18 Jun 2013 15:13:59 +0000 (11:13 -0400)
commitf3299782b3da925e5228e32893f6afadd225c538
treef45381811ae1a081f94c8d5a24fa78da2977d42b
parent6480bad916be21ca432052577d043b80434eea12
ext4: reduce object size when !CONFIG_PRINTK

Reduce the object size ~10% could be useful for embedded systems.

Add #ifdef CONFIG_PRINTK #else #endif blocks to hold formats and
arguments, passing " " to functions when !CONFIG_PRINTK and still
verifying format and arguments with no_printk.

$ size fs/ext4/built-in.o*
   text    data     bss     dec     hex filename
 239375     610     888  240873   3ace9 fs/ext4/built-in.o.new
 264167     738     888  265793   40e41 fs/ext4/built-in.o.old

    $ grep -E "CONFIG_EXT4|CONFIG_PRINTK" .config
    # CONFIG_PRINTK is not set
    CONFIG_EXT4_FS=y
    CONFIG_EXT4_USE_FOR_EXT23=y
    CONFIG_EXT4_FS_POSIX_ACL=y
    # CONFIG_EXT4_FS_SECURITY is not set
    # CONFIG_EXT4_DEBUG is not set

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/ext4.h
fs/ext4/super.c