On Sat, 2012-06-30 at 22:18 +0200, Rafał Miłecki wrote: > Having bus number printed makes it much easier to anaylze logs on > systems with more buses. For example Netgear WNDR4500 has 3 AMBA buses > in total, which makes standard log really messy. [] > V4: replace some pr_debug I missed in V3 > > Unfortunately, bcma_debug is not complete in case of > CONFIG_DYNAMIC_DEBUG. It'd be great if someone could help with that... [] > diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h [] > @@ -10,6 +10,26 @@ > > #define BCMA_CORE_SIZE 0x1000 > > +/* We use pr_fmt, so call printk directly */ > +#define bcma_err(bus, fmt, ...) \ > + printk(KERN_ERR KBUILD_MODNAME " bus%d: " fmt, (bus)->num, ##__VA_ARGS__) > +#define bcma_warn(bus, fmt, ...) \ > + printk(KERN_WARNING KBUILD_MODNAME " bus%d: " fmt, (bus)->num, ##__VA_ARGS__) > +#define bcma_info(bus, fmt, ...) \ > + printk(KERN_INFO KBUILD_MODNAME " bus%d: " fmt, (bus)->num, ##__VA_ARGS__) > + > +#if defined(CONFIG_DYNAMIC_DEBUG) > +/* FIXME: include bus num */ > +#define bcma_debug(bus, fmt, ...) \ > + pr_debug(fmt, ##__VA_ARGS__) > +#elif defined(DEBUG) > +#define bcma_debug(bus, fmt, ...) \ > + printk(KERN_DEBUG KBUILD_MODNAME " bus%d: " fmt, (bus)->num, ##__VA_ARGS__) > +#else > +#define bcma_debug(bus, fmt, ...) \ > + no_printk(KERN_DEBUG KBUILD_MODNAME " bus%d: " fmt, (bus)->num, ##__VA_ARGS__) > +#endif Well, my suggestion would be to use a standardized "bcma: bus%d: " prefix and change these to: #define bcma_err(bus, fmt, ...) \ pr_err("bus%d: " fmt, (bus)->num, ##__VA_ARGS__) #define bcma_warn(bus, fmt, ...) \ pr_warn("bus%d: " fmt, (bus)->num, ##__VA_ARGS__) #define bcma_info(bus, fmt, ...) \ pr_info("bus%d: " fmt, (bus)->num, ##__VA_ARGS__) #define bcma_debug(bus, fmt, ...) \ pr_debug("bus%d: " fmt, (bus)->num, ##__VA_ARGS__) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html