lkml.org 
[lkml]   [2010]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: CONFIG_MTD_DEBUG vs generic DEBUG support in kernel.h
Date
Artem Bityutskiy <dedekind1@gmail.com> writes:

> On Tue, 2010-03-16 at 13:55 +0100, Ferenc Wagner wrote:
>
>> include/linux/mtd/mtd.h contains the following snippet:
>>
>> #ifdef CONFIG_MTD_DEBUG
>> #define DEBUG(n, args...) \
>> do { \
>> if (n <= CONFIG_MTD_DEBUG_VERBOSE) \
>> printk(KERN_INFO args); \
>> } while(0)
>>
>> which conflicts with the generic debugging support in
>> include/linux/kernel.h:
>>
>> #ifdef DEBUG
>> #define pr_devel(fmt, ...) \
>> printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
>>
>> (that is, gcc emits redefinition warnings on modules which
>> #define DEBUG on their own and also include mtd.h)
>> Unfortunately, the DEBUG macro is used rather heavily under
>> drivers/mtd. Should we resolve this somehow or is it better
>> to just live with it?
>
> IMO, this MTD debug stuff is not very useful and could be just killed.

Well, I found the mtdcore debugging somewhat useful. But anyway,
killing it would be about as much work as renaming the macro, or using
something standard as dev_(v)dbg or pr_debug/devel (btw. what's the
difference?) instead. I'm willing to do some mechanical work on either
one if you wish.
--
Regards,
Feri.


\
 
 \ /
  Last update: 2010-03-18 17:57    [W:0.155 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site