mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Denys Vlasenko <dvlasenk@redhat.com>
To: David Woodhouse <David.Woodhouse@intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>,
	Brian Norris <computersforpeace@gmail.com>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Artem Bityutskiy <artem.bityutskiy@linux.intel.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_erase_oneblock
Date: Wed, 30 Mar 2016 15:01:00 +0200	[thread overview]
Message-ID: <1459342860-24168-2-git-send-email-dvlasenk@redhat.com> (raw)
In-Reply-To: <1459342860-24168-1-git-send-email-dvlasenk@redhat.com>

This function compiles to 2142 bytes of machine code.
In C, the function is about 150 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
95943075 20860288 35991552 152794915 91b7723 vmlinux_before
95942947 20860288 35991552 152794787 91b76a3 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..c740bd2 100644
--- a/drivers/mtd/chips/cfi_cmdset_0020.c
+++ b/drivers/mtd/chips/cfi_cmdset_0020.c
@@ -728,7 +728,7 @@ write_error:
 }
 
 
-static inline int do_erase_oneblock(struct map_info *map, struct flchip *chip, unsigned long adr)
+static int do_erase_oneblock(struct map_info *map, struct flchip *chip, unsigned long adr)
 {
 	struct cfi_private *cfi = map->fldrv_priv;
 	map_word status, status_OK;
-- 
2.1.0

  reply	other threads:[~2016-03-30 13:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30 13:00 [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_write_buffer Denys Vlasenko
2016-03-30 13:01 ` Denys Vlasenko [this message]
2016-03-30 17:36 ` Brian Norris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1459342860-24168-2-git-send-email-dvlasenk@redhat.com \
    --to=dvlasenk@redhat.com \
    --cc=David.Woodhouse@intel.com \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=computersforpeace@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®