mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux@dominikbrodowski.net>
To: Jason Baron <jbaron@redhat.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	joe@perches.com, greg@kroah.com, nick@nick-andrew.net,
	randy.dunlap@oracle.com
Subject: Re: [PATCH 6/7] dynamic debug v2 - convert cpufreq
Date: Wed, 16 Jul 2008 01:07:31 +0200	[thread overview]
Message-ID: <20080715230731.GA15208@isilmar.linta.de> (raw)
In-Reply-To: <20080715213613.GG23331@redhat.com>

Hi,

On Tue, Jul 15, 2008 at 05:36:13PM -0400, Jason Baron wrote:
> +#include <linux/dynamic_debug_cpufreq.h>

what's contained in this file (couldn't find it in this or one of the other
diffs, but may have missed it).

> -#define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "cpufreq-nforce2", msg)
> +#define dprintk(msg...) do { \
> +	if (dynamic_dbg_enabled(TYPE_FLAG, CPUFREQ_DEBUG_DRIVER, cpufreq_debug)) \
> +		cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "cpufreq-nforce2", msg); \
> +	} while (0)

Hm.... What about leaving this as it is, renaming the
drivers/cpufreq/cpufreq.c function to __cpufreq_debug_printk(), and then
adding to include/linux/cpufreq.h

#define cpufreq_debug_printk(type, prefix, msg...) do { \
	if (dynamic_dbg_enabled(TYPE_FLAG, type, cpufreq_debug))
		cpufreq_debug_printk(type, prefix, msg); \
	} while (0)

> +#if defined(CONFIG_CPU_FREQ_DEBUG) || defined (CONFIG_DYNAMIC_PRINTK_DEBUG)
...
> +#if defined(CONFIG_CPU_FREQ_DEBUG) || defined (CONFIG_DYNAMIC_PRINTK_DEBUG)

can't we just depend on thing on another?

> -module_param(debug, uint, 0644);
> -MODULE_PARM_DESC(debug, "CPUfreq debugging: add 1 to debug core,"
> +module_param(cpufreq_debug, uint, 0644);
> +MODULE_PARM_DESC(cpufreq_debug, "CPUfreq debugging: add 1 to debug core,"
>  			" 2 to debug drivers, and 4 to debug governors.");

cpufreq.cpufreq_debug is ugly and not backwards compatible... what about 

module_param_named(debug, cpufreq_debug, uint, 0644) [or the other way
around, I always forget...])

Best,
	Dominik

  reply	other threads:[~2008-07-15 23:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-15 21:36 Jason Baron
2008-07-15 23:07 ` Dominik Brodowski [this message]
2008-07-17 21:05   ` Jason Baron
2008-07-17 21:15     ` Greg KH
2008-07-17 21:27       ` Dominik Brodowski
2008-07-17 21:46       ` Jason Baron
2008-07-17 22:20         ` Dominik Brodowski

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=20080715230731.GA15208@isilmar.linta.de \
    --to=linux@dominikbrodowski.net \
    --cc=akpm@linux-foundation.org \
    --cc=greg@kroah.com \
    --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

Powered by JetHome