Re: [PATCH 6/7] dynamic debug v2 - convert cpufreq
From: Dominik Brodowski
Date: Tue Jul 15 2008 - 19:07:45 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/