From 2a64bd55f015dde0b32c752377d5820d9d280873 Mon Sep 17 00:00:00 2001 From: Kyle K Date: Fri, 1 Feb 2013 02:48:49 -0600 Subject: fix improper ptr check, fix offset calc, ratelimit printk messages --- main.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'main.h') diff --git a/main.h b/main.h index cb751d0..e2727db 100644 --- a/main.h +++ b/main.h @@ -9,8 +9,12 @@ */ #ifdef HELLO_DEBUG #define PDEBUG(fmt, args...) printk( KERN_DEBUG "[hello] " fmt, ##args) + #define PRDEBUG(fmt, args...) if (printk_ratelimit()) \ + printk( KERN_DEBUG "[hello] " fmt, ##args) #else - #define PDEBUG(fmt, args...) /* not debugging: nothing */ + /* not debugging: nothing */ + #define PDEBUG(fmt, args...) + #define PRDEBUG(fmt, args...) #endif #ifndef HELLO_MAJOR -- cgit v1.2.3