From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH V2 0/3] recursive printk, make functions from logging macros
Date: Thu, 4 Mar 2010 22:56:51 -0800 [thread overview]
Message-ID: <cover.1267771398.git.joe@perches.com> (raw)
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(-)
next reply other threads:[~2010-03-05 6:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-05 6:56 Joe Perches [this message]
2010-03-05 6:56 ` [PATCH 2/3] device.h drivers/base/core.c Convert dev_<level> macros to functions Joe Perches
2010-03-05 7:10 ` Andrew Morton
2010-03-05 7:23 ` Joe Perches
2010-03-05 7:29 ` Andrew Morton
[not found] ` <20100304232928.2e45bdd1.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2010-04-05 19:05 ` [PATCH 00/11] treewide: rename dev_info variables to something else Joe Perches
2010-04-05 19:05 ` [PATCH 11/11] drivers/uwb: Rename dev_info to wdi Joe Perches
2010-04-05 21:44 ` Joe Perches
2010-04-05 21:51 ` David Miller
2010-04-06 12:42 ` David Vrabel
2010-04-05 22:24 ` [PATCH 11/11 v2] " Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1267771398.git.joe@perches.com \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).