From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Subject: [PATCH V2 0/3] recursive printk, make functions from logging macros Date: Thu, 4 Mar 2010 22:56:51 -0800 Message-ID: Cc: Linus Torvalds , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, netdev@vger.kernel.org To: Andrew Morton Return-path: Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org dev_ macros use a lot of repetitive string space and arguments pr_ macros use repetitive unnecessary KERN_ 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_ 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_ macros to functions kernel.h kernel/printk.c: Convert pr_ 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(-)