public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>, Greg KH <greg@kroah.com>,
	linux-next@vger.kernel.org, Jason Baron <jbaron@redhat.com>,
	Greg Banks <gnb@sgi.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: linux-next: driver-core tree build failure
Date: Tue, 10 Mar 2009 14:53:11 +0100	[thread overview]
Message-ID: <20090310145311.6bf9d9e9@skybase> (raw)
In-Reply-To: <alpine.LRH.2.00.0903101423200.25436@vixen.sonytel.be>

On Tue, 10 Mar 2009 14:31:17 +0100 (CET)
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> wrote:

> crypto/zlib.c has:
> 
>     #define pr_fmt(fmt)     "%s: " fmt, __func__
> 
> If CONFIG_DYNAMIC_DEBUG is set, include/linux/kernel.h has:
> 
> #define pr_debug(fmt, ...) do { \
> 	dynamic_pr_debug(pr_fmt(fmt), ##__VA_ARGS__); \
> 	} while (0)
> 
> include/linux/dynamic_debug.h has:
> 
> #define dynamic_pr_debug(fmt, ...) do {					\
> 	static struct _ddebug descriptor				\
> 	__used								\
> 	__attribute__((section("__verbose"), aligned(8))) =		\
> 	{ KBUILD_MODNAME, __func__, __FILE__, fmt, DEBUG_HASH,	\
> 		DEBUG_HASH2, __LINE__, _DPRINTK_FLAGS_DEFAULT };	\
> 	if (__dynamic_dbg_enabled(descriptor))				\
> 		printk(KERN_DEBUG KBUILD_MODNAME ":" fmt,		\
> 				##__VA_ARGS__);				\
> 	} while (0)

The dynamic_pr_debug macro currently works only with pr_fmt definitions
that do not add additional parameters. The way how we use the pr_fmt
macro is:

#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt

The same could be done with the problematic pr_fmt definition:

#define pr_fmt(fmt)     __func__ ": " fmt

> BTW, Martin: Is `#define pr_fmt(fmt)     "%s: " fmt, __func__' a valid and
> intended usage of your pr_fmt() infrastructure?

The indended use is a simple prefix to the format string. To paste an
additional parameter is an interesting use of the pr_fmt macro ..

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.


  parent reply	other threads:[~2009-03-10 13:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090310192440.949884a1.sfr@canb.auug.org.au>
2009-03-10 13:31 ` linux-next: driver-core tree build failure Geert Uytterhoeven
2009-03-10 13:38   ` Herbert Xu
2009-03-10 13:53   ` Martin Schwidefsky [this message]
2009-03-10 15:29     ` Geert Uytterhoeven
2009-03-10 16:08       ` Martin Schwidefsky
2009-03-10 20:02         ` Jason Baron
2009-03-11  3:30           ` Greg KH
2009-03-11  8:33           ` Geert Uytterhoeven
2009-03-11 10:07           ` Greg Banks
2009-03-11 10:50             ` Geert Uytterhoeven
2009-03-11 15:12             ` Jason Baron
2009-06-23  6:01 Stephen Rothwell
2009-06-23 15:29 ` Greg KH
2009-06-23 16:28   ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2009-07-14  6:33 Stephen Rothwell
2009-07-14  7:31 ` David Brownell
2009-07-16 22:50   ` Greg KH

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=20090310145311.6bf9d9e9@skybase \
    --to=schwidefsky@de.ibm.com \
    --cc=Geert.Uytterhoeven@sonycom.com \
    --cc=gnb@sgi.com \
    --cc=greg@kroah.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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