Skip to content

recursive printk, make functions from logging macros

Joe Perches linux-edac linux-ia64 linux-media linux-s390 lkml netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 3 repliesIn review
  2. v1 posting 2/20 of 2 patches 0 repliesSuperseded
  3. v1 posting 1/22 patches 15 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3vsprintf: Recursive vsnprintf: Add "%pV", struct va_formatinclude/linux/kernel.h lib/vsprintf.c+14 -00 replies
2/3device.h drivers/base/core.c Convert dev_<level> macros to functionsdrivers/base/core.c include/linux/device.h+135 -2624 replies
3/3kernel.h kernel/printk.c: Convert pr_<level> macros to functionsinclude/linux/kernel.h kernel/printk.c+80 -160 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchDavid VrabelDoug ThompsonMike Isely
1/3
2/3A-b A-b A-b A-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH V2 0/3] recursive printk, make functions from logging macros

dev_<level> macros use a lot of repetitive string space and arguments pr_<level> macros use repetitive unnecessary KERN_<level> strings

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

This patchset saves about 60K of text in an x86 defconfig.

This implementation 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 (3):
vsprintf: Recursive vsnprintf: Add "%pV", struct va_format device.h drivers/base/core.c Convert dev_<level> macros to functions kernel.h kernel/printk.c: Convert pr_<level> macros to functions

 drivers/base/core.c    |   56 +++++++++++++++++++++++++
 include/linux/device.h |  105 ++++++++++++++++++++++++++++++++++++------------
 include/linux/kernel.h |   75 +++++++++++++++++++++++++++-------
 kernel/printk.c        |   26 ++++++++++++
 lib/vsprintf.c         |    9 ++++
 5 files changed, 229 insertions(+), 42 deletions(-)