提交 715cf92a 编写于 作者: A Andy Shevchenko 提交者: Greg Kroah-Hartman

usb: serial: dump small buffers with help of %*ph

There is a specifier we may use to dump small buffers.
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 477527ba
...@@ -520,12 +520,7 @@ static void usa28_instat_callback(struct urb *urb) ...@@ -520,12 +520,7 @@ static void usa28_instat_callback(struct urb *urb)
goto exit; goto exit;
} }
/* /*dev_dbg(&urb->dev->dev, "%s %12ph", __func__, data);*/
dev_dbg(&urb->dev->dev,
"%s %x %x %x %x %x %x %x %x %x %x %x %x", __func__,
data[0], data[1], data[2], data[3], data[4], data[5],
data[6], data[7], data[8], data[9], data[10], data[11]);
*/
/* Now do something useful with the data */ /* Now do something useful with the data */
msg = (struct keyspan_usa28_portStatusMessage *)data; msg = (struct keyspan_usa28_portStatusMessage *)data;
...@@ -607,11 +602,7 @@ static void usa49_instat_callback(struct urb *urb) ...@@ -607,11 +602,7 @@ static void usa49_instat_callback(struct urb *urb)
goto exit; goto exit;
} }
/* /*dev_dbg(&urb->dev->dev, "%s: %11ph", __func__, data);*/
dev_dbg(&urb->dev->dev, "%s: %x %x %x %x %x %x %x %x %x %x %x",
__func__, data[0], data[1], data[2], data[3], data[4],
data[5], data[6], data[7], data[8], data[9], data[10]);
*/
/* Now do something useful with the data */ /* Now do something useful with the data */
msg = (struct keyspan_usa49_portStatusMessage *)data; msg = (struct keyspan_usa49_portStatusMessage *)data;
......
...@@ -300,8 +300,7 @@ static void pl2303_set_termios(struct tty_struct *tty, ...@@ -300,8 +300,7 @@ static void pl2303_set_termios(struct tty_struct *tty,
i = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), i = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
GET_LINE_REQUEST, GET_LINE_REQUEST_TYPE, GET_LINE_REQUEST, GET_LINE_REQUEST_TYPE,
0, 0, buf, 7, 100); 0, 0, buf, 7, 100);
dev_dbg(&port->dev, "0xa1:0x21:0:0 %d - %x %x %x %x %x %x %x\n", i, dev_dbg(&port->dev, "0xa1:0x21:0:0 %d - %7ph\n", i, buf);
buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]);
if (cflag & CSIZE) { if (cflag & CSIZE) {
switch (cflag & CSIZE) { switch (cflag & CSIZE) {
...@@ -448,8 +447,7 @@ static void pl2303_set_termios(struct tty_struct *tty, ...@@ -448,8 +447,7 @@ static void pl2303_set_termios(struct tty_struct *tty,
i = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), i = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
GET_LINE_REQUEST, GET_LINE_REQUEST_TYPE, GET_LINE_REQUEST, GET_LINE_REQUEST_TYPE,
0, 0, buf, 7, 100); 0, 0, buf, 7, 100);
dev_dbg(&port->dev, "0xa1:0x21:0:0 %d - %x %x %x %x %x %x %x\n", i, dev_dbg(&port->dev, "0xa1:0x21:0:0 %d - %7ph\n", i, buf);
buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]);
if (cflag & CRTSCTS) { if (cflag & CRTSCTS) {
if (spriv->type == HX) if (spriv->type == HX)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册