summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2006-02-13 15:34:11 -0800
committerDavid S. Miller <davem@davemloft.net>2006-02-13 15:34:11 -0800
commit7a11c4d0635d9f6995736390b8c3346fe6f63d57 (patch)
tree462aa4a17b5ef59350f726ca39035c513bd2e5a5 /include/net
parent75c0141ca2fdae7c332d8f17412fbe0939dd005f (diff)
downloadblackbird-obmc-linux-7a11c4d0635d9f6995736390b8c3346fe6f63d57.tar.gz
blackbird-obmc-linux-7a11c4d0635d9f6995736390b8c3346fe6f63d57.zip
[IRDA]: Ratelimit messages.
From: Joe Perches <joe@perches.com> Based upon a patch by Dave Jones. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/irda/irda.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h
index 05a840837fe7..1880e46ecc9b 100644
--- a/include/net/irda/irda.h
+++ b/include/net/irda/irda.h
@@ -82,9 +82,9 @@ do { if(!(expr)) { \
#define IRDA_ASSERT_LABEL(label)
#endif /* CONFIG_IRDA_DEBUG */
-#define IRDA_WARNING(args...) printk(KERN_WARNING args)
-#define IRDA_MESSAGE(args...) printk(KERN_INFO args)
-#define IRDA_ERROR(args...) printk(KERN_ERR args)
+#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)
/*
* Magic numbers used by Linux-IrDA. Random numbers which must be unique to
OpenPOWER on IntegriCloud