lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 11 Nov 2014 13:13:41 -0800
From:	Joe Perches <joe@...ches.com>
To:	Samuel Ortiz <samuel@...tiz.org>
Cc:	netdev <netdev@...r.kernel.org>
Subject: [PATCH] irda: Simplify IRDA logging macros

These are the same as net_<level>_ratelimited, so
use the more common style in the macro definition.

Signed-off-by: Joe Perches <joe@...ches.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 


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists