[PATCH v2 0/7] vsprintf: reduce code size and clean up

From: Andrà Goddard Rosa
Date: Sun Nov 01 2009 - 12:10:31 EST

This patch reduces code size by 240 bytes on my Core 2 with gcc 4.4.1:
text data bss dec hex filename
15767 0 8 15775 3d9f lib/vsprintf.o-before
15527 0 8 15535 3caf lib/vsprintf.o-after

and implements some cleanups.

v2: addressed feedback from Frederic Weisbecker review (thanks!!)
and split into separate patches
v1: original submission

André Goddard Rosa (7):
vsprintf: factorize "(null)" string
vsprintf: pre-calculate final string length
vsprintf: give it some care to please checkpatch.pl
vsprintf: use TOLOWER whenever possible
vsprintf: reduce code size by avoiding extra check
vsprintf: move local vars to block local vars and remove unneeded
vsprintf: factor out skip_space code in a separate function

lib/vsprintf.c | 306 ++++++++++++++++++++++++++++++--------------------------
1 files changed, 163 insertions(+), 143 deletions(-)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/