aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 4d46e299afb5..792bf0aa779b 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -276,7 +276,17 @@ extern void print_hex_dump(const char *level, const char *prefix_str,
276 const void *buf, size_t len, bool ascii); 276 const void *buf, size_t len, bool ascii);
277extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type, 277extern void print_hex_dump_bytes(const char *prefix_str, int prefix_type,
278 const void *buf, size_t len); 278 const void *buf, size_t len);
279#define hex_asc(x) "0123456789abcdef"[x] 279
280extern const char hex_asc[];
281#define hex_asc_lo(x) hex_asc[((x) & 0x0f)]
282#define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4]
283
284static inline char *pack_hex_byte(char *buf, u8 byte)
285{
286 *buf++ = hex_asc_hi(byte);
287 *buf++ = hex_asc_lo(byte);
288 return buf;
289}
280 290
281#define pr_emerg(fmt, arg...) \ 291#define pr_emerg(fmt, arg...) \
282 printk(KERN_EMERG fmt, ##arg) 292 printk(KERN_EMERG fmt, ##arg)