mtd: cfi_cmdset_0020: Deinline do_write_buffer, save 5316 bytes

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Aug 1 18:59:03 PDT 2016


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=21a190b970878be8298c3f696aede1de36986817
Commit:     21a190b970878be8298c3f696aede1de36986817
Parent:     8bf66b24cfcb71d6f3e33a0ebd119678823d7c70
Author:     Denys Vlasenko <dvlasenk at redhat.com>
AuthorDate: Fri Apr 8 20:35:43 2016 +0200
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Sat Jul 9 18:53:33 2016 -0700

    mtd: cfi_cmdset_0020: Deinline do_write_buffer, save 5316 bytes
    
    This function compiles to 2554 bytes of machine code.
    In C, the function is almost 200 lines long.
    
    It has only one callsite, but forced inlining that much code
    makes gcc generate significantly worse code. Let gcc itself decide
    what to do.
    
    Signed-off-by: Denys Vlasenko <dvlasenk at redhat.com>
    CC: David Woodhouse <David.Woodhouse at intel.com>
    CC: Dan Carpenter <dan.carpenter at oracle.com>
    CC: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
    CC: linux-mtd at lists.infradead.org
    CC: linux-kernel at vger.kernel.org
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/chips/cfi_cmdset_0020.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c
index 9a1a6ff..94d3eb4 100644
--- a/drivers/mtd/chips/cfi_cmdset_0020.c
+++ b/drivers/mtd/chips/cfi_cmdset_0020.c
@@ -416,7 +416,7 @@ static int cfi_staa_read (struct mtd_info *mtd, loff_t from, size_t len, size_t
 	return ret;
 }
 
-static inline int do_write_buffer(struct map_info *map, struct flchip *chip,
+static int do_write_buffer(struct map_info *map, struct flchip *chip,
 				  unsigned long adr, const u_char *buf, int len)
 {
 	struct cfi_private *cfi = map->fldrv_priv;



More information about the linux-mtd-cvs mailing list