Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1367188 > unrolled thread
| Started by | Denys Vlasenko <dvlasenk@redhat.com> |
|---|---|
| First post | 2016-03-30 15:10 +0200 |
| Last post | 2016-03-30 19:40 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_write_buffer Denys Vlasenko <dvlasenk@redhat.com> - 2016-03-30 15:10 +0200
[PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_erase_oneblock Denys Vlasenko <dvlasenk@redhat.com> - 2016-03-30 15:10 +0200
Re: [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_write_buffer Brian Norris <computersforpeace@gmail.com> - 2016-03-30 19:40 +0200
| From | Denys Vlasenko <dvlasenk@redhat.com> |
|---|---|
| Date | 2016-03-30 15:10 +0200 |
| Subject | [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_write_buffer |
| Message-ID | <rio2K-5RV-1@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Denys Vlasenko <dvlasenk@redhat.com> |
|---|---|
| Date | 2016-03-30 15:10 +0200 |
| Subject | [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_erase_oneblock |
| Message-ID | <rio2K-5RV-17@gated-at.bofh.it> |
| In reply to | #1367188 |
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
[toc] | [prev] | [next] | [standalone]
| From | Brian Norris <computersforpeace@gmail.com> |
|---|---|
| Date | 2016-03-30 19:40 +0200 |
| Subject | Re: [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_write_buffer |
| Message-ID | <risg3-jV-31@gated-at.bofh.it> |
| In reply to | #1367188 |
Please check MAINTAINERS and resend to the appropriate list: MEMORY TECHNOLOGY DEVICES (MTD) M: David Woodhouse <dwmw2@infradead.org> M: Brian Norris <computersforpeace@gmail.com> L: linux-mtd@lists.infradead.org
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web