[PATCH 0/7] printk: add pr_level_once, guard print_hex_dump

2010-12-05 Thread Joe Perches
There are many uses of printk_once(KERN_level. Add pr_level_once macros to avoid printk_once(KERN_level pr_fmt(fmt). Add an #ifdef CONFIG_PRINTK for print_hex_dump and static inline void functions for the #else cases to reduce embedded code size. Neaten and organize the rest of the code. Joe

[PATCH 2/7] include/linux/printk.h: Use space after #define

2010-12-05 Thread Joe Perches
Signed-off-by: Joe Perches j...@perches.com --- include/linux/printk.h | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/linux/printk.h b/include/linux/printk.h index 0b4513b..b6218d3 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h

[PATCH 6/7] include/linux/printk.h: Organize printk_ratelimited macros

2010-12-05 Thread Joe Perches
Use no_printk for !CONFIG_PRINTK printk_ratelimited. Whitespace cleanup. Signed-off-by: Joe Perches j...@perches.com --- include/linux/printk.h | 25 - 1 files changed, 12 insertions(+), 13 deletions(-) diff --git a/include/linux/printk.h b/include/linux/printk.h index

[PATCH 7/7] include/linux/printk.h: Use tab not spaces for indent

2010-12-05 Thread Joe Perches
Signed-off-by: Joe Perches j...@perches.com --- include/linux/printk.h | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/linux/printk.h b/include/linux/printk.h index b4be1b1..41388e3 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h @@

[PATCH 3/7] include/linux/printk.h: Use and neaten no_printk

2010-12-05 Thread Joe Perches
Move no_printk above first CONFIG_PRINTK block so it can be used by printk_once. Convert statement expression if (0) printk macros to no_printk. Convert printk_once(x...) to more normally used (fmt, ...) fmt, ##__VA_ARGS__. Standardize __attribute__ use. Expand single line inline functions. Remove

[PATCH 1/7] include/linux/printk.h: Move console functions and variables together

2010-12-05 Thread Joe Perches
Signed-off-by: Joe Perches j...@perches.com --- include/linux/printk.h | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/linux/printk.h b/include/linux/printk.h index b772ca5..0b4513b 100644 --- a/include/linux/printk.h +++