summaryrefslogtreecommitdiff
path: root/include/linux/printk.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-01-12 16:59:47 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 08:03:10 -0800
commitac83ed687837a44c6e46fb16411fb0d299fffd80 (patch)
tree04abc4db3153056b2c478209bfb8a4c7701d6a5b /include/linux/printk.h
parent16cb839f13324978bd58082e69de81a711802b11 (diff)
include/linux/printk.h lib/hexdump.c: neatening and add CONFIG_PRINTK guard
- Move prototypes and align arguments. - Add CONFIG_PRINTK guard for print_hex functions Signed-off-by: Joe Perches <joe@perches.com> Cc: Matt Mackall <mpm@selenic.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/printk.h')
-rw-r--r--include/linux/printk.h42
1 files changed, 28 insertions, 14 deletions
diff --git a/include/linux/printk.h b/include/linux/printk.h
index 6442156707c9..e96bd41491bd 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -141,20 +141,6 @@ static inline void log_buf_kexec_setup(void)
extern void dump_stack(void) __cold;
-enum {
- DUMP_PREFIX_NONE,
- DUMP_PREFIX_ADDRESS,
- DUMP_PREFIX_OFFSET
-};
-extern void hex_dump_to_buffer(const void *buf, size_t len,
- int rowsize, int groupsize,
- char *linebuf, size_t linebuflen, bool ascii);
-extern void print_hex_dump(const char *level, const char *prefix_str,
- int prefix_type, int rowsize, int groupsize,
- const void *buf, size_t len, bool ascii);
-extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
- const void *buf, size_t len);
-
#ifndef pr_fmt
#define pr_fmt(fmt) fmt
#endif
@@ -286,4 +272,32 @@ extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
#endif
+
+enum {
+ DUMP_PREFIX_NONE,
+ DUMP_PREFIX_ADDRESS,
+ DUMP_PREFIX_OFFSET
+};
+extern void hex_dump_to_buffer(const void *buf, size_t len,
+ int rowsize, int groupsize,
+ char *linebuf, size_t linebuflen, bool ascii);
+#ifdef CONFIG_PRINTK
+extern void print_hex_dump(const char *level, const char *prefix_str,
+ int prefix_type, int rowsize, int groupsize,
+ const void *buf, size_t len, bool ascii);
+extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
+ const void *buf, size_t len);
+#else
+static inline void print_hex_dump(const char *level, const char *prefix_str,
+ int prefix_type, int rowsize, int groupsize,
+ const void *buf, size_t len, bool ascii)
+{
+}
+static inline void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
+ const void *buf, size_t len)
+{
+}
+
+#endif
+
#endif