From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753555AbcC3NBN (ORCPT ); Wed, 30 Mar 2016 09:01:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54423 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753336AbcC3NBG (ORCPT ); Wed, 30 Mar 2016 09:01:06 -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_erase_oneblock Date: Wed, 30 Mar 2016 15:01:00 +0200 Message-Id: <1459342860-24168-2-git-send-email-dvlasenk@redhat.com> In-Reply-To: <1459342860-24168-1-git-send-email-dvlasenk@redhat.com> References: <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 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 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..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