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. --- This patch (option A) keeps using pr_<level> in custom functions. Pros: We use prefered functions (pr_<level>) in custom functions Cons: Sometimes we may need to call pr_<level> directly. We won't get messages prefixed then (because of not setting pr_fmt). --- drivers/bcma/bcma_private.h | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/bcma/bcma_private.h b/drivers/bcma/bcma_private.h index b81755b..1f638c5 100644 --- a/drivers/bcma/bcma_private.h +++ b/drivers/bcma/bcma_private.h @@ -1,10 +1,6 @@ #ifndef LINUX_BCMA_PRIVATE_H_ #define LINUX_BCMA_PRIVATE_H_ -#ifndef pr_fmt -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt -#endif - #include <linux/bcma/bcma.h> #include <linux/delay.h> @@ -12,6 +8,11 @@ struct bcma_bus; +#define bcma_err(fmt, ...) \ + pr_err(KBUILD_MODNAME "-%d: " fmt, bus->num, ##__VA_ARGS__) +#define bcma_info(fmt, ...) \ + pr_info(KBUILD_MODNAME "-%d: " fmt, bus->num, ##__VA_ARGS__) + /* main.c */ int __devinit bcma_bus_register(struct bcma_bus *bus); void bcma_bus_unregister(struct bcma_bus *bus); -- 1.7.7 -- 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