Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758817AbcDHSgH (ORCPT ); Fri, 8 Apr 2016 14:36:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36286 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758799AbcDHSgF (ORCPT ); Fri, 8 Apr 2016 14:36:05 -0400 From: Denys Vlasenko To: David Woodhouse Cc: Denys Vlasenko , Brian Norris , Dan Carpenter , Artem Bityutskiy , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_write_buffer, save 5316 bytes Date: Fri, 8 Apr 2016 20:35:43 +0200 Message-Id: <1460140543-12487-3-git-send-email-dvlasenk@redhat.com> In-Reply-To: <1460140543-12487-1-git-send-email-dvlasenk@redhat.com> References: <1460140543-12487-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: 1233 Lines: 33 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 CC: David Woodhouse CC: Brian Norris CC: Dan Carpenter CC: Artem Bityutskiy CC: linux-mtd@lists.infradead.org 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