]> www.infradead.org Git - users/jedix/linux-maple.git/commit
lib/vsprintf.c: help gcc make number() smaller
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Sat, 16 Jan 2016 00:58:41 +0000 (16:58 -0800)
committerMaran Wilson <maran.wilson@oracle.com>
Wed, 15 Nov 2017 23:14:22 +0000 (15:14 -0800)
commit6f969549bb2d0e750475af181118b72f5cd13f9f
treeb6b0faa9c6a02d43f8c52a25ef87eca58bee8f00
parent415746ab7a5ec4ecc79238416b09457d6e1a7d0b
lib/vsprintf.c: help gcc make number() smaller

One consequence of the reorganization of struct printf_spec to make
field_width 24 bits was that number() gained about 180 bytes.  Since
spec is never passed to other functions, we can help gcc make number()
lose most of that extra weight by using local variables for the field
width and precision.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Joe Perches <joe@perches.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Maurizio Lombardi <mlombard@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 1c7a8e622e84c9164dd665f5ad4879eac71bdc1e)

Orabug: 26178769

Signed-off-by: Maran Wilson <maran.wilson@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
lib/vsprintf.c