All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/12] introduce skip_spaces(), reducing code size plus some clean-ups
@ 2009-11-07 15:16 ` André Goddard Rosa
  0 siblings, 0 replies; 66+ messages in thread
From: André Goddard Rosa @ 2009-11-07 15:16 UTC (permalink / raw)
  To: Martin Schwidefsky, Heiko Carstens, linux390, Michael Holzheu,
	Andrew Morton
  Cc: André Goddard Rosa

This patch reduces lib.a code size by 173 bytes on my Core 2 with gcc 4.4.1
even considering that it exports a newly defined function skip_spaces()
to drivers:
   text    data     bss     dec     hex filename                           
  64867     840     592   66299   102fb (TOTALS-lib.a-before)
  64954     584     588   66126   1024e (TOTALS-lib.a-after)
and implements some code tidy up.

Besides reducing lib.a size, it converts many in-tree drivers to use the
newly defined function, which makes another small reduction on kernel size
overall when those drivers are used.

p.s.: Ingo, I hope to have finally fixed my environment by using send-email now.
Please let me know if you have any problem with these and thank you for the
good advice. get_maintainer.pl gave lots of people as output, I hope that's ok.

Changelog:
   v4: convert drivers over newly defined skip_spaces() function 
   v3: improved comments on patch 5/7 and factorize a switch statement on 6/7
as per suggestions from Ingo and Frederic (thanks!)
   v2: addressed feedback from Frederic Weisbecker review (thanks!!)
and split into separate patches
   v1: original submission

André Goddard Rosa (12):
  vsprintf: factorize "(null)" string
  vsprintf: pre-calculate final string length for later use
  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
    ones
  vsprintf: factor out skip_space code in a separate function
  vsprintf: reuse almost identical simple_strtoulX() functions
  ctype: constify read-only _ctype string
  string: factorize skip_spaces and export it to be generally available
  string: on strstrip(), first remove leading spaces before running
    over str
  tree-wide: convert open calls to remove spaces to skip_spaces() lib
    function

 arch/s390/kernel/debug.c              |    3 +-
 arch/um/drivers/mconsole_kern.c       |   16 +-
 arch/x86/kernel/cpu/mtrr/if.c         |   11 +-
 drivers/md/dm-table.c                 |    6 +-
 drivers/md/md.c                       |    4 +-
 drivers/parisc/pdc_stable.c           |    9 +-
 drivers/platform/x86/thinkpad_acpi.c  |    7 +-
 drivers/pnp/interface.c               |   36 +---
 drivers/s390/block/dasd_proc.c        |    5 +-
 drivers/video/backlight/lcd.c         |    4 +-
 drivers/video/display/display-sysfs.c |    2 +-
 fs/cachefiles/daemon.c                |    8 +-
 fs/ext4/super.c                       |    7 +-
 include/linux/ctype.h                 |    2 +-
 include/linux/string.h                |    1 +
 kernel/params.c                       |    8 +-
 lib/argv_split.c                      |   13 +-
 lib/ctype.c                           |   50 +++---
 lib/dynamic_debug.c                   |    4 +-
 lib/string.c                          |   19 ++-
 lib/vsprintf.c                        |  342 ++++++++++++++++-----------------
 net/irda/irnet/irnet.h                |    1 +
 net/irda/irnet/irnet_ppp.c            |    8 +-
 net/netfilter/xt_recent.c             |    3 +-
 sound/pci/hda/hda_hwdep.c             |    7 +-
 25 files changed, 264 insertions(+), 312 deletions(-)

^ permalink raw reply	[flat|nested] 66+ messages in thread

end of thread, other threads:[~2009-11-15  6:37 UTC | newest]

Thread overview: 66+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-07 15:16 [PATCH v4 00/12] introduce skip_spaces(), reducing code size plus some clean-ups André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] " André Goddard Rosa
2009-11-07 15:16 ` [PATCH v4 01/12] vsprintf: factorize "(null)" string André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] " André Goddard Rosa
2009-11-08 15:37   ` Jan Engelhardt
2009-11-08 15:49     ` André Goddard Rosa
2009-11-09  3:28   ` Rusty Russell
2009-11-10 14:33     ` André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] [PATCH v4 02/12] vsprintf: pre-calculate final string length for later use André Goddard Rosa
2009-11-07 15:16 ` André Goddard Rosa
2009-11-07 15:16 ` [PATCH v4 03/12] vsprintf: give it some care to please checkpatch.pl André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] " André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] [PATCH v4 04/12] vsprintf: use TOLOWER whenever possible André Goddard Rosa
2009-11-07 15:16 ` André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] [PATCH v4 05/12] vsprintf: reduce code size by avoiding extra check André Goddard Rosa
2009-11-07 15:16 ` André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] [PATCH v4 06/12] vsprintf: move local vars to block local vars and remove unneeded ones André Goddard Rosa
2009-11-07 15:16 ` André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] [PATCH v4 07/12] vsprintf: factor out skip_space code in a separate function André Goddard Rosa
2009-11-08 15:44   ` Jan Engelhardt
2009-11-08 15:52     ` André Goddard Rosa
     [not found]   ` <31525.1257770343@redhat.com>
2009-11-09 15:31     ` André Goddard Rosa
2009-11-07 15:16 ` [PATCH v4 07/12] vsprintf: factor out skip_space code in a separate function André Goddard Rosa
2009-11-07 15:16 ` [PATCH v4 08/12] vsprintf: reuse almost identical simple_strtoulX() functions André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] " André Goddard Rosa
2009-11-07 16:33   ` André Goddard Rosa
2009-11-07 15:16 ` [PATCH v4 09/12] ctype: constify read-only _ctype string André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] " André Goddard Rosa
2009-11-07 15:16 ` [PATCH v4 10/12] string: factorize skip_spaces and export it to be generally available André Goddard Rosa
2009-11-07 16:23   ` André Goddard Rosa
2009-11-07 15:16   ` [uml-devel] " André Goddard Rosa
2009-11-08 15:54   ` Jan Engelhardt
2009-11-08 16:38   ` James Bottomley
2009-11-08 16:54     ` Jan Engelhardt
2009-11-08 16:59       ` André Goddard Rosa
2009-11-08 16:50   ` Alan Cox
2009-11-08 16:50     ` [uml-devel] " Alan Cox
2009-11-08 16:50     ` Alan Cox
2009-11-09 14:02     ` André Goddard Rosa
2009-11-08 16:56   ` Jan Engelhardt
2009-11-07 15:16 ` André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] [PATCH v4 11/12] string: on strstrip(), first remove leading spaces before running over str André Goddard Rosa
2009-11-07 15:16 ` André Goddard Rosa
2009-11-07 15:16 ` [PATCH v4 12/12] tree-wide: convert open calls to remove spaces to skip_spaces() lib function André Goddard Rosa
2009-11-07 15:16 ` André Goddard Rosa
2009-11-07 15:16   ` [uml-devel] " André Goddard Rosa
2009-11-08 18:47   ` Theodore Tso
2009-11-08 18:47     ` [uml-devel] " Theodore Tso
2009-11-08 18:47     ` Theodore Tso
2009-11-08 18:47     ` Theodore Tso
2009-11-08 20:23     ` Julia Lawall
2009-11-08 20:23       ` [uml-devel] " Julia Lawall
2009-11-15  6:19       ` André Goddard Rosa
2009-11-15  6:37     ` André Goddard Rosa
2009-11-14  4:20   ` [ibm-acpi-devel] " Henrique de Moraes Holschuh
2009-11-14  7:44     ` André Goddard Rosa
2009-11-08 16:05 ` [dm-devel] [PATCH v4 00/12] introduce skip_spaces(), reducing code size plus some clean-ups James Bottomley
2009-11-08 16:05   ` James Bottomley
2009-11-08 16:05   ` [uml-devel] " James Bottomley
2009-11-08 16:05   ` James Bottomley
2009-11-08 16:05   ` James Bottomley
2009-11-08 16:52   ` André Goddard Rosa
2009-11-08 16:52     ` [uml-devel] " André Goddard Rosa
2009-11-08 16:52     ` André Goddard Rosa
2009-11-08 16:55     ` Jan Engelhardt
2009-11-08 17:02 ` Alexey Dobriyan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.