diff options
author | Himanshu Chauhan <himanshu@symmetricore.com> | 2010-01-23 02:52:41 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-03 16:42:52 -0800 |
commit | aad86577b829be29048e0a692e1c28c3ffeda6ca (patch) | |
tree | 700722701a8fe938f9acd4f41a63e1cbb1cbf4c0 /drivers/staging/usbip | |
parent | 1e5065dbd6fe53b46d8281db7b4286751dcf607a (diff) | |
download | kernel_samsung_smdk4412-aad86577b829be29048e0a692e1c28c3ffeda6ca.zip kernel_samsung_smdk4412-aad86577b829be29048e0a692e1c28c3ffeda6ca.tar.gz kernel_samsung_smdk4412-aad86577b829be29048e0a692e1c28c3ffeda6ca.tar.bz2 |
Staging: usbip: use print_hex_dump() instead of open coding it.
Signed-off-by: Himanshu Chauhan <himanshu@symmetricore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/usbip')
-rw-r--r-- | drivers/staging/usbip/usbip_common.c | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c index 57c0ff5..3367a52 100644 --- a/drivers/staging/usbip/usbip_common.c +++ b/drivers/staging/usbip/usbip_common.c @@ -63,33 +63,8 @@ DEVICE_ATTR(usbip_debug, (S_IRUGO | S_IWUSR), show_flag, store_flag); static void usbip_dump_buffer(char *buff, int bufflen) { - int i; - - if (bufflen > 128) { - for (i = 0; i < 128; i++) { - if (i%24 == 0) - printk(KERN_DEBUG " "); - printk(KERN_DEBUG "%02x ", (unsigned char) buff[i]); - if (i%4 == 3) - printk(KERN_DEBUG "| "); - if (i%24 == 23) - printk(KERN_DEBUG "\n"); - } - printk(KERN_DEBUG "... (%d byte)\n", bufflen); - return; - } - - for (i = 0; i < bufflen; i++) { - if (i%24 == 0) - printk(KERN_DEBUG " "); - printk(KERN_DEBUG "%02x ", (unsigned char) buff[i]); - if (i%4 == 3) - printk(KERN_DEBUG "| "); - if (i%24 == 23) - printk(KERN_DEBUG "\n"); - } - printk(KERN_DEBUG "\n"); - + print_hex_dump(KERN_DEBUG, "usb-ip", DUMP_PREFIX_OFFSET, 16, 4, + buff, bufflen, false); } static void usbip_dump_pipe(unsigned int p) |