All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_write_buffer
@ 2016-03-30 13:00 Denys Vlasenko
  2016-03-30 13:01 ` [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_erase_oneblock Denys Vlasenko
  2016-03-30 17:36 ` [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_write_buffer Brian Norris
  0 siblings, 2 replies; 3+ messages in thread
From: Denys Vlasenko @ 2016-03-30 13:00 UTC (permalink / raw)
  To: David Woodhouse
  Cc: Denys Vlasenko, Brian Norris, Dan Carpenter, Artem Bityutskiy,
	linux-kernel

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 worse code. Let gcc itself decide what to do.

    text     data      bss       dec     hex filename
95943139 20860256 35991552 152794947 91b7743 vmlinux_before
95943075 20860288 35991552 152794915 91b7723 vmlinux

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: David Woodhouse <David.Woodhouse@intel.com>
CC: Brian Norris <computersforpeace@gmail.com>
CC: Dan Carpenter <dan.carpenter@oracle.com>
CC: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
CC: linux-kernel@vger.kernel.org
---
 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..70dd2b1 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;
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-30 17:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-30 13:00 [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_write_buffer Denys Vlasenko
2016-03-30 13:01 ` [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_erase_oneblock Denys Vlasenko
2016-03-30 17:36 ` [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_write_buffer Brian Norris

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.