netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH 0/2] Make functions of dev_<level> macros, recursive vsnprintf
@ 2010-03-04  6:27 Joe Perches
  0 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2010-03-04  6:27 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Nick Andrew
  Cc: linux-kernel, Greg Kroah-Hartman, netdev

(Typo'ed Linus' email address, added Greg KH and netdev)
 
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] 28+ messages in thread

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

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1267682641.git.joe@perches.com>
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
     [not found] ` <f2b24d484347c083fa87856a75c1d96102af9005.1267682641.git.joe@perches.com>
2010-03-05  0:56   ` [PATCH 2/2] device.h drivers/base/core.c Convert dev_<level> macros to functions Andrew Morton
2010-03-05  1:00     ` Andrew Morton
2010-03-05  2:46       ` Joe Perches
2010-03-04  6:27 [RESEND PATCH 0/2] Make functions of dev_<level> macros, recursive vsnprintf Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).