diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2012-08-03 11:38:05 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-13 18:52:35 -0700 |
commit | c197de2bea11cabbd6f9ad8c6e3f82faa5fc8497 (patch) | |
tree | eaac4eccde0c933a5e43dca05a745bd8eae2d802 | |
parent | d9fc49b2e0c510bf8c54e157a57bac3bb74184f0 (diff) | |
download | linux-stable-c197de2bea11cabbd6f9ad8c6e3f82faa5fc8497.tar.gz linux-stable-c197de2bea11cabbd6f9ad8c6e3f82faa5fc8497.tar.bz2 linux-stable-c197de2bea11cabbd6f9ad8c6e3f82faa5fc8497.zip |
staging: rts_pstor: substitute rtsx_dump by print_hex_dump
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rts_pstor/trace.h | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/drivers/staging/rts_pstor/trace.h b/drivers/staging/rts_pstor/trace.h index bc83b49a4eb4..cf60a1b872b3 100644 --- a/drivers/staging/rts_pstor/trace.h +++ b/drivers/staging/rts_pstor/trace.h @@ -83,33 +83,9 @@ do { \ #endif #ifdef CONFIG_RTS_PSTOR_DEBUG -static inline void rtsx_dump(u8 *buf, int buf_len) -{ - int i; - u8 tmp[16] = {0}; - u8 *_ptr = buf; - - for (i = 0; i < ((buf_len)/16); i++) { - RTSX_DEBUGP("%02x %02x %02x %02x %02x %02x %02x %02x " - "%02x %02x %02x %02x %02x %02x %02x %02x\n", - _ptr[0], _ptr[1], _ptr[2], _ptr[3], _ptr[4], _ptr[5], - _ptr[6], _ptr[7], _ptr[8], _ptr[9], _ptr[10], _ptr[11], - _ptr[12], _ptr[13], _ptr[14], _ptr[15]); - _ptr += 16; - } - if ((buf_len) % 16) { - memcpy(tmp, _ptr, (buf_len) % 16); - _ptr = tmp; - RTSX_DEBUGP("%02x %02x %02x %02x %02x %02x %02x %02x " - "%02x %02x %02x %02x %02x %02x %02x %02x\n", - _ptr[0], _ptr[1], _ptr[2], _ptr[3], _ptr[4], _ptr[5], - _ptr[6], _ptr[7], _ptr[8], _ptr[9], _ptr[10], _ptr[11], - _ptr[12], _ptr[13], _ptr[14], _ptr[15]); - } -} - -#define RTSX_DUMP(buf, buf_len) rtsx_dump((u8 *)(buf), (buf_len)) - +#define RTSX_DUMP(buf, buf_len) \ + print_hex_dump(KERN_DEBUG, RTSX_STOR, DUMP_PREFIX_NONE, \ + 16, 1, (buf), (buf_len), false) #else #define RTSX_DUMP(buf, buf_len) #endif |