Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753502AbcC3NBG (ORCPT ); Wed, 30 Mar 2016 09:01:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60853 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752983AbcC3NBE (ORCPT ); Wed, 30 Mar 2016 09:01:04 -0400 From: Denys Vlasenko To: David Woodhouse Cc: Denys Vlasenko , Brian Norris , Dan Carpenter , Artem Bityutskiy , linux-kernel@vger.kernel.org Subject: [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_write_buffer Date: Wed, 30 Mar 2016 15:00:59 +0200 Message-Id: <1459342860-24168-1-git-send-email-dvlasenk@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1353 Lines: 35 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 CC: David Woodhouse CC: Brian Norris CC: Dan Carpenter CC: Artem Bityutskiy 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