From: Greg Kroah-Hartman Date: Thu, 13 Sep 2012 16:19:05 +0000 (-0700) Subject: USB: serial: move usb_serial_debug_data to use %*ph X-Git-Tag: v3.7-rc1~171^2~127 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1db9e45c340213d3b19d456fbf678406c1334959;p=profile%2Fivi%2Fkernel-x86-ivi.git USB: serial: move usb_serial_debug_data to use %*ph Now that we have a printk modifier for data streams, use it instead of rolling our own. Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 86c0b45..9e9a0a8 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h @@ -360,15 +360,9 @@ static inline void usb_serial_debug_data(int debug, const char *function, int size, const unsigned char *data) { - int i; - - if (debug) { - dev_printk(KERN_DEBUG, dev, "%s - length = %d, data = ", - function, size); - for (i = 0; i < size; ++i) - printk("%.2x ", data[i]); - printk("\n"); - } + if (debug) + dev_printk(KERN_DEBUG, dev, "%s - length = %d, data = %*ph\n", + function, size, size, data); } /* Use our own dbg macro */