All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Make functions of dev_<level> macros, recursive vsnprintf
@ 2010-03-04  6:21 Joe Perches
  2010-03-04  6:21 ` [PATCH 1/2] vsprintf: Recursive vsnprintf: Add "%pV", struct va_format Joe Perches
                   ` (4 more replies)
  0 siblings, 5 replies; 32+ messages in thread
From: Joe Perches @ 2010-03-04  6:21 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Nick Andrew; +Cc: linux-kernel

dev_<level> macros use a lot of repetitive string space.

Eliminate the string prefixes and function arguments from all the macro uses
and consolidate them in functions.

This patchset saves about 60K.

This implementation also adds the ability to use a struct va_format to
emit a format string along with va_list arguments.

This %pV implementation should not be used without a wrapper that
does printf argument verification like the dev_<level> functions.

Inspired a bit by Nick Andrew's patches and Linus' comments in December 2008
http://lkml.org/lkml/2008/12/6/15
http://lkml.org/lkml/2008/12/6/101

Joe Perches (2):
  vsprintf: Recursive vsnprintf: Add "%pV", struct va_format
  device.h drivers/base/core.c Convert dev_<level> macros to functions

 drivers/base/core.c    |  124 ++++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/device.h |  102 +++++++++++++++++++++++++++++----------
 include/linux/kernel.h |    5 ++
 lib/vsprintf.c         |    9 ++++
 4 files changed, 214 insertions(+), 26 deletions(-)


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

end of thread, other threads:[~2010-03-15 15:34 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-04  6:21 [PATCH 0/2] Make functions of dev_<level> macros, recursive vsnprintf Joe Perches
2010-03-04  6:21 ` [PATCH 1/2] vsprintf: Recursive vsnprintf: Add "%pV", struct va_format Joe Perches
2010-03-04  6:21 ` [PATCH 2/2] device.h drivers/base/core.c Convert dev_<level> macros to functions Joe Perches
2010-03-05  0:56   ` Andrew Morton
2010-03-05  1:00     ` Andrew Morton
2010-03-05  1:00       ` Andrew Morton
2010-03-05  2:46       ` Joe Perches
2010-03-04  6:27 ` [PATCH 1/2] vsprintf: Recursive vsnprintf: Add "%pV", struct va_format Joe Perches
2010-03-04  6:27 ` [PATCH 2/2] device.h drivers/base/core.c Convert dev_<level> macros to functions Joe Perches
2010-03-04 22:38 ` [RESEND PATCH 0/2] Make functions of dev_<level> macros, recursive vsnprintf Andrew Morton
2010-03-04 23:06   ` Linus Torvalds
2010-03-06 21:36     ` Joe Perches
2010-03-06 22:03       ` Linus Torvalds
2010-03-06 22:30         ` Joe Perches
2010-03-06 22:52           ` Linus Torvalds
2010-03-06 22:57             ` Linus Torvalds
2010-03-06 23:35               ` Joe Perches
2010-03-06 23:46                 ` Linus Torvalds
2010-03-06 23:48                   ` Linus Torvalds
2010-03-06 23:57                     ` Joe Perches
2010-03-06 23:58                     ` Linus Torvalds
2010-03-07  1:10                       ` [PATCH] vsprintf.c: Reduce sizeof struct printf_spec from 24 to 8 bytes Joe Perches
2010-03-07  2:03                         ` Linus Torvalds
2010-03-07  2:24                           ` Linus Torvalds
2010-03-07  2:33                           ` [PATCH] vsprintf.c: Use noinline_for_stack Joe Perches
2010-03-08 23:39                             ` Joe Perches
2010-03-13  0:25                             ` Andrew Morton
2010-03-13 15:35                               ` Linus Torvalds
2010-03-13 17:44                                 ` Joe Perches
2010-03-13 19:54                                   ` [PATCH] vsprintf.c: remove stack variable ksym from Joe Perches
2010-03-15 15:01                                     ` Paulo Marques
2010-03-15 15:01                                       ` Paulo Marques

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.