From: "Rafał Miłecki" <zajec5@gmail.com>
To: linux-wireless@vger.kernel.org, Joe Perches <joe@perches.com>,
Hauke Mehrtens <hauke@hauke-m.de>
Cc: "Rafał Miłecki" <zajec5@gmail.com>
Subject: [PATCH option A] bcma: use custom printing functions
Date: Thu, 28 Jun 2012 21:44:48 +0200 [thread overview]
Message-ID: <1340912688-3089-1-git-send-email-zajec5@gmail.com> (raw)
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
next reply other threads:[~2012-06-28 19:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-28 19:44 Rafał Miłecki [this message]
2012-06-28 19:48 ` [PATCH option A] bcma: use custom printing functions Johannes Berg
2012-06-28 19:56 ` Rafał Miłecki
2012-06-28 20:05 ` Joe Perches
2012-06-28 20:18 ` Rafał Miłecki
2012-06-28 20:29 ` Hauke Mehrtens
2012-06-28 20:42 ` Rafał Miłecki
2012-06-28 21:09 ` Joe Perches
2012-06-28 20:48 ` Rafał Miłecki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1340912688-3089-1-git-send-email-zajec5@gmail.com \
--to=zajec5@gmail.com \
--cc=hauke@hauke-m.de \
--cc=joe@perches.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox