From: Greg KH <greg@kroah.com>
To: Jason Baron <jbaron@redhat.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
joe@perches.com, nick@nick-andrew.net, randy.dunlap@oracle.com
Subject: Re: [PATCH 2/8] dynamic debug - core infrastructure
Date: Wed, 18 Jun 2008 09:08:12 -0700 [thread overview]
Message-ID: <20080618160812.GB9453@kroah.com> (raw)
In-Reply-To: <20080613190039.GC8813@redhat.com>
On Fri, Jun 13, 2008 at 03:00:39PM -0400, Jason Baron wrote:
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -595,6 +595,22 @@ extern const char *dev_driver_string(struct device *dev);
> #ifdef DEBUG
> #define dev_dbg(dev, format, arg...) \
> dev_printk(KERN_DEBUG , dev , format , ## arg)
> +#elif defined(CONFIG_DYNAMIC_PRINTK_DEBUG)
> +#define dev_dbg(dev, format, ...) do { \
> + static char mod_name[] \
> + __attribute__((section("__verbose_strings"))) \
> + = KBUILD_MODNAME; \
> + static struct mod_debug foobar \
> + __used \
> + __attribute__((section("__verbose"), aligned(8))) = \
> + { mod_name, mod_name, "0", "0", NULL }; \
Does the compiler merge all of these variables together into one within
the same file?
If not, should we have a new macro, one per file, for this information?
> --- a/include/linux/kernel.h
> +++ b/include/linux/kernel.h
> @@ -14,6 +14,7 @@
> #include <linux/compiler.h>
> #include <linux/bitops.h>
> #include <linux/log2.h>
> +#include <linux/dynamic_printk.h>
> #include <asm/byteorder.h>
> #include <asm/bug.h>
>
> @@ -288,15 +289,86 @@ extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
> #define pr_info(fmt, arg...) \
> printk(KERN_INFO fmt, ##arg)
>
> -#ifdef DEBUG
> -/* If you are writing a driver, please use dev_dbg instead */
Hm, this comment is still correct, please don't delete it :)
Other than those minor nits, and the fact that your patch has a lot of
trailing whitespace, it's looking very good so far.
thanks,
greg k-h
next prev parent reply other threads:[~2008-06-18 16:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-13 19:00 [PATCH 2/8] dynamic debug - core infrastructure Jason Baron
2008-06-13 22:30 ` Joe Perches
2008-06-16 19:15 ` Jason Baron
2008-06-18 16:08 ` Greg KH [this message]
2008-06-20 15:38 ` Jason Baron
2008-06-21 8:17 ` Greg KH
2008-06-18 20:52 ` Pavel Machek
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=20080618160812.GB9453@kroah.com \
--to=greg@kroah.com \
--cc=akpm@linux-foundation.org \
--cc=jbaron@redhat.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nick@nick-andrew.net \
--cc=randy.dunlap@oracle.com \
/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