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.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index e40c950e1d62..4824f26a0dc2 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -372,13 +372,18 @@ extern const char hex_asc[];
372#define hex_asc_lo(x) hex_asc[((x) & 0x0f)] 372#define hex_asc_lo(x) hex_asc[((x) & 0x0f)]
373#define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4] 373#define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4]
374 374
375static inline char *pack_hex_byte(char *buf, u8 byte) 375static inline char *hex_byte_pack(char *buf, u8 byte)
376{ 376{
377 *buf++ = hex_asc_hi(byte); 377 *buf++ = hex_asc_hi(byte);
378 *buf++ = hex_asc_lo(byte); 378 *buf++ = hex_asc_lo(byte);
379 return buf; 379 return buf;
380} 380}
381 381
382static inline char * __deprecated pack_hex_byte(char *buf, u8 byte)
383{
384 return hex_byte_pack(buf, byte);
385}
386
382extern int hex_to_bin(char ch); 387extern int hex_to_bin(char ch);
383extern int __must_check hex2bin(u8 *dst, const char *src, size_t count); 388extern int __must_check hex2bin(u8 *dst, const char *src, size_t count);
384 389