Re: [PATCH] drivers/mtd/chips/cfi_cmdset_0020.c: Deinline do_write_buffer, save 5316 bytes

From: Brian Norris
Date: Sat Jul 09 2016 - 21:54:56 EST


On Fri, Apr 08, 2016 at 08:35:43PM +0200, Denys Vlasenko wrote:
> 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@xxxxxxxxxx>
> CC: David Woodhouse <David.Woodhouse@xxxxxxxxx>
> CC: Brian Norris <computersforpeace@xxxxxxxxx>
> CC: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> CC: Artem Bityutskiy <artem.bityutskiy@xxxxxxxxxxxxxxx>
> CC: linux-mtd@xxxxxxxxxxxxxxxxxxx
> CC: linux-kernel@xxxxxxxxxxxxxxx

Applied to l2-mtd.git