mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jack Stone <jack@hawkeye.stone.uk.eu.org>
To: Randy Dunlap <randy.dunlap@oracle.com>
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, Ian Kent <raven@themaw.net>
Subject: Re: [PATCH 0/7] Cleanup code to replace DPRINTK with pr_debug
Date: Sun, 10 Jun 2007 20:29:22 +0100	[thread overview]
Message-ID: <466C5112.4090004@hawkeye.stone.uk.eu.org> (raw)
In-Reply-To: <20070610105024.b16d1708.randy.dunlap@oracle.com>

Randy Dunlap wrote:
> Hi,
> 
> Doesn't this move printk-debug control from local source files
> (i.e., targeted, specific ones) to a more global control (DEBUG)?
> 
> If so, I don't see that as a generally good thing.
> 
> If not, please correct me and tell me how this is useful to just
> one instance of using pr_debug() in say, ncpfs, without pr_debug()
> being enabled throughout the entire kernel tree.
> 
> Thanks.

I can certainly see that point but using pr_debug means that all the
debug print statements are centralised so that changes to the format
could be more uniform. For example, it would be very easy to change the
macro to print the function name it was called from followed by the message.

The only DPRINTK's with specific DEBUGs were alternative.c, which had an
extra if, and ncpfs which had an extra #ifdef DEBUG_NCP. The alternative
solution would be to change the #defines to use pr_debug rather than
printk directly:

#define DPRINTK(format, args...) \
	pr_debug(format, ##args);

The advantage would be maitaining subsystem specific debug control with
centralised format control.

Jack

      reply	other threads:[~2007-06-10 19:29 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-08 22:18 Jack Stone
2007-06-08 22:20 ` [PATCH 1/7] Add a new debug function to kernel.h Jack Stone
2007-06-08 22:21 ` [PATCH 2/7] Replace DPRINTK with pr_debug in alternative.c Jack Stone
2007-06-08 22:22 ` [PATCH 3/7] Replace DPRINTK with pr_debug in autofs Jack Stone
2007-06-08 22:40   ` H. Peter Anvin
2007-06-08 22:23 ` [PATCH 4/7] Update DPRINTK macro to use pr_debug in autofs4 Jack Stone
2007-06-08 22:24 ` [PATCH 5/7] Replace DPRINTK with pr_debug in ncpfs Jack Stone
2007-06-08 22:25 ` [PATCH 6/7] Add pr_debug_pid to kernel.h Jack Stone
2007-06-08 22:25 ` [PATCH 7/7] Replace DPRINTK with pr_debug_pid in autofs4 Jack Stone
2007-06-09  6:43 ` [PATCH 0/7] Cleanup code to replace DPRINTK with pr_debug Ian Kent
2007-06-09  7:56   ` Jack Stone
2007-06-09  8:00 ` Jack Stone
2007-06-09  8:06   ` [PATCH 1/7] Add a new debug function to kernel.h Jack Stone
2007-06-11  4:34     ` Ian Kent
2007-06-09  8:08   ` [PATCH 2/7] Replace DPRINTK with pr_debug in alternative.c Jack Stone
2007-06-09 18:00     ` Alexey Dobriyan
2007-06-09 18:05       ` Jack Stone
2007-06-09  8:10   ` [PATCH 3/7] Replace DPRINTK with pr_debug in autofs Jack Stone
2007-06-09  8:12   ` [PATCH 4/7] Update DPRINTK macro to use pr_debug Jack Stone
2007-06-09  8:15   ` [PATCH 5/7] Replace DPRINTK with pr_debug in ncpfs Jack Stone
2007-06-09  8:18   ` [PATCH 6/7] Add pr_debug_pid to kernel.h Jack Stone
2007-06-09 18:03     ` Alexey Dobriyan
2007-06-09 18:04       ` Jack Stone
2007-06-09  8:20   ` [PATCH 7/7] Replace DPRINTK with pr_debug_pid in autofs4 Jack Stone
2007-06-10 17:50 ` [PATCH 0/7] Cleanup code to replace DPRINTK with pr_debug Randy Dunlap
2007-06-10 19:29   ` Jack Stone [this message]

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=466C5112.4090004@hawkeye.stone.uk.eu.org \
    --to=jack@hawkeye.stone.uk.eu.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    --cc=raven@themaw.net \
    /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

all inboxes | Powered by JetHome®