lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1460140543-12487-3-git-send-email-dvlasenk@redhat.com>
Date:	Fri,  8 Apr 2016 20:35:43 +0200
From:	Denys Vlasenko <dvlasenk@...hat.com>
To:	David Woodhouse <David.Woodhouse@...el.com>
Cc:	Denys Vlasenko <dvlasenk@...hat.com>,
	Brian Norris <computersforpeace@...il.com>,
	Dan Carpenter <dan.carpenter@...cle.com>,
	Artem Bityutskiy <artem.bityutskiy@...ux.intel.com>,
	linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: 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@...hat.com>
CC: David Woodhouse <David.Woodhouse@...el.com>
CC: Brian Norris <computersforpeace@...il.com>
CC: Dan Carpenter <dan.carpenter@...cle.com>
CC: Artem Bityutskiy <artem.bityutskiy@...ux.intel.com>
CC: linux-mtd@...ts.infradead.org
CC: linux-kernel@...r.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ