Prev: [PATCH] drivers/net/wimax/i2400m/fw.c fix possible double free
Next: usbtouchscreen: support bigger iNexio touchscreens
From: Ferenc Wagner on 16 Mar 2010 09:00 Hi, 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? (Please keep me on Cc, I'm not subscribed.) -- Thanks, Feri. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Artem Bityutskiy on 16 Mar 2010 09:10 On Tue, 2010-03-16 at 13:55 +0100, Ferenc Wagner wrote: > Hi, > > 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? > > (Please keep me on Cc, I'm not subscribed.) IMO, this MTD debug stuff is not very useful and could be just killed. -- Best Regards, Artem Bityutskiy (Артём Битюцкий) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Ferenc Wagner on 18 Mar 2010 13:00 Artem Bityutskiy <dedekind1(a)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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Wolfram Sang on 18 Mar 2010 20:40 > something standard as dev_(v)dbg or pr_debug/devel (btw. what's the > difference?) instead. pr_devel will never produce code if !DEBUG. For pr_debug, it may be different as we have DYNAMIC_DEBUG meanwhile (see kernel.h) -- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ |
From: Artem Bityutskiy on 8 Apr 2010 04:10
On Thu, 2010-03-18 at 17:20 +0100, Ferenc Wagner wrote: > Artem Bityutskiy <dedekind1(a)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. Yeah, probalby you can transform them to dev_dbg. But the "levels" do not seem to be available with dev_dbg, so I guess you could nuke some higher level messages? -- Best Regards, Artem Bityutskiy (Артём Битюцкий) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |