Skip to contentSkip to conversation

gspca: dtcs033: use %*ph to print small buffer

PATCH New Antonio Cardace 1 participant 1 message Feb 12, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gspca: dtcs033: use %*ph to print small buffer

Use %*ph format to print small buffer as hex string.

Remove newline at the end of the format string as it would be duplicated by the one supplied as last argument.

---
 drivers/media/usb/gspca/dtcs033.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/media/usb/gspca/dtcs033.c +2 -4
index cdf27cf0112a..7654c8c08eda 100644
@@ -76,12 +76,10 @@ static int reg_reqs(struct gspca_dev *gspca_dev,
 		} else if (preq->bRequestType & USB_DIR_IN) {
 
 			gspca_dbg(gspca_dev, D_STREAM,
-				  "USB IN (%d) returned[%d] %02X %02X %02X %s\n",
+				  "USB IN (%d) returned[%d] %3ph %s",
 				  i,
 				  preq->wLength,
-				  gspca_dev->usb_buf[0],
-				  gspca_dev->usb_buf[1],
-				  gspca_dev->usb_buf[2],
+				  gspca_dev->usb_buf,
 				  preq->wLength > 3 ? "...\n" : "\n");
 		}
 
Signature · 1 line
2.15.1.354.g95ec6b1b3