From: Andrew Morton <akpm@linux-foundation.org>
To: Jason Baron <jbaron@redhat.com>
Cc: gregkh@suse.de, joe@perches.com, jim.cromie@gmail.com,
bvanassche@acm.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] dynamic_debug: consolidate repetitive struct _ddebug descriptor definitions
Date: Thu, 8 Sep 2011 16:52:30 -0700 [thread overview]
Message-ID: <20110908165230.a7505321.akpm@linux-foundation.org> (raw)
In-Reply-To: <94c0e3275b0bf7d2cad8e7909da1482a867e7bc6.1314725877.git.jbaron@redhat.com>
On Tue, 30 Aug 2011 14:28:41 -0400
Jason Baron <jbaron@redhat.com> wrote:
> Replace the repetitive struct _ddebug descriptor definitions with
> a new DECLARE_DYNAMIC_DEBUG_META_DATA(name, fmt) macro.
>
> ...
>
> +#define DECLARE_DYNAMIC_DEBUG_METADATA(name, fmt) \
> + static struct _ddebug __used __aligned(8) \
> + __attribute__((section("__verbose"))) name = { \
> + .modname = KBUILD_MODNAME, \
> + .function = __func__, \
> + .filename = __FILE__, \
> + .format = (fmt), \
> + .lineno = __LINE__, \
> + .flags = _DPRINTK_FLAGS_DEFAULT, \
> + .enabled = false, \
> + }
<anal>That macro implements a definition, not a declaration</anal>
--- a/include/linux/dynamic_debug.h~dynamic_debug-consolidate-repetitive-struct-_ddebug-descriptor-definitions-fix
+++ a/include/linux/dynamic_debug.h
@@ -54,7 +54,7 @@ extern int __dynamic_netdev_dbg(struct _
const char *fmt, ...)
__attribute__ ((format (printf, 3, 4)));
-#define DECLARE_DYNAMIC_DEBUG_METADATA(name, fmt) \
+#define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \
static struct _ddebug __used __aligned(8) \
__attribute__((section("__verbose"))) name = { \
.modname = KBUILD_MODNAME, \
@@ -68,7 +68,7 @@ extern int __dynamic_netdev_dbg(struct _
#define dynamic_pr_debug(fmt, ...) \
do { \
- DECLARE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
+ DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
if (unlikely(descriptor.enabled)) \
__dynamic_pr_debug(&descriptor, pr_fmt(fmt), \
##__VA_ARGS__); \
@@ -76,7 +76,7 @@ do { \
#define dynamic_dev_dbg(dev, fmt, ...) \
do { \
- DECLARE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
+ DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
if (unlikely(descriptor.enabled)) \
__dynamic_dev_dbg(&descriptor, dev, fmt, \
##__VA_ARGS__); \
@@ -84,7 +84,7 @@ do { \
#define dynamic_netdev_dbg(dev, fmt, ...) \
do { \
- DECLARE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
+ DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \
if (unlikely(descriptor.enabled)) \
__dynamic_netdev_dbg(&descriptor, dev, fmt, \
##__VA_ARGS__); \
_
next prev parent reply other threads:[~2011-09-08 23:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-30 18:28 [PATCH 0/4] dynamic debug: cleanups + compile fix v2 Jason Baron
2011-08-30 18:28 ` [PATCH 1/4] dynamic_debug: consolidate repetitive struct _ddebug descriptor definitions Jason Baron
2011-09-08 23:52 ` Andrew Morton [this message]
2011-09-09 2:13 ` Joe Perches
2011-09-09 3:42 ` Andrew Morton
2011-09-09 4:02 ` Joe Perches
2011-09-09 4:20 ` Andrew Morton
2011-09-09 4:35 ` Joe Perches
2011-09-09 10:31 ` Bart Van Assche
2011-09-09 19:23 ` Jim Cromie
2011-09-09 21:04 ` Joe Perches
2011-09-09 22:06 ` Jim Cromie
2011-09-09 22:32 ` Joe Perches
2011-09-12 14:47 ` Jason Baron
2011-09-12 18:15 ` Jim Cromie
2011-09-12 15:00 ` Jason Baron
2011-08-30 18:28 ` [PATCH 2/4] dynamic_debug: remove num_enabled accounting Jason Baron
2011-08-30 18:28 ` [PATCH 3/4] dynamic_debug: use a single printk() to emit msgs Jason Baron
2011-09-08 23:52 ` Andrew Morton
2011-08-30 18:28 ` [PATCH 4/4] dynamic_debug: fix undefined reference to `__netdev_printk' Jason Baron
2011-09-01 16:16 ` Arnd Bergmann
-- strict thread matches above, loose matches on Subject: below --
2011-08-25 17:34 [PATCH 0/4] dynamic debug: cleanups + compile fix Jason Baron
2011-08-25 17:34 ` [PATCH 1/4] dynamic_debug: consolidate repetitive struct _ddebug descriptor definitions Jason Baron
2011-08-26 10:46 ` Bart Van Assche
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=20110908165230.a7505321.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=bvanassche@acm.org \
--cc=gregkh@suse.de \
--cc=jbaron@redhat.com \
--cc=jim.cromie@gmail.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.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
Powered by JetHome