From: Joe Perches <joe@perches.com>
To: Samuel Ortiz <samuel@sortiz.org>
Cc: netdev <netdev@vger.kernel.org>
Subject: [PATCH] irda: Simplify IRDA logging macros
Date: Tue, 11 Nov 2014 13:13:41 -0800 [thread overview]
Message-ID: <1415740421.16070.11.camel@perches.com> (raw)
These are the same as net_<level>_ratelimited, so
use the more common style in the macro definition.
Signed-off-by: Joe Perches <joe@perches.com>
---
I wonder if the IRDA_ macro uses should be converted
directly instead but that diffstat is quite a bit
longer than this one
42 files changed, 486 insertions(+), 479 deletions(-)
vs
include/net/irda/irda.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h
index a059465..42aa054 100644
--- a/include/net/irda/irda.h
+++ b/include/net/irda/irda.h
@@ -77,9 +77,9 @@ do { if(!(expr)) { \
#define IRDA_ASSERT_LABEL(label)
#endif /* CONFIG_IRDA_DEBUG */
-#define IRDA_WARNING(args...) do { if (net_ratelimit()) printk(KERN_WARNING args); } while (0)
-#define IRDA_MESSAGE(args...) do { if (net_ratelimit()) printk(KERN_INFO args); } while (0)
-#define IRDA_ERROR(args...) do { if (net_ratelimit()) printk(KERN_ERR args); } while (0)
+#define IRDA_ERROR net_err_ratelimited
+#define IRDA_WARNING net_warn_ratelimited
+#define IRDA_MESSAGE net_info_ratelimited
/*
* Magic numbers used by Linux-IrDA. Random numbers which must be unique to
next reply other threads:[~2014-11-11 21:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-11 21:13 Joe Perches [this message]
2014-11-11 21:22 ` [PATCH] irda: Simplify IRDA logging macros David Miller
2014-11-11 21:37 ` [PATCH] irda: Remove IRDA_<TYPE> " Joe Perches
2014-11-11 22:44 ` [PATCH] irda: Convert IRDA_DEBUG to pr_debug Joe Perches
2014-11-12 18:57 ` David Miller
2014-11-13 0:56 ` Joe Perches
2014-11-13 2:15 ` [PATCH] irda: Fix build failures after IRDA_DEBUG->pr_debug Joe Perches
2014-11-13 3:01 ` David Miller
2014-11-11 23:11 ` [PATCH] irda: Remove IRDA_<TYPE> logging macros David Miller
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=1415740421.16070.11.camel@perches.com \
--to=joe@perches.com \
--cc=netdev@vger.kernel.org \
--cc=samuel@sortiz.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;
as well as URLs for NNTP newsgroup(s).