Skip to contentSkip to conversation

input: mouse: use %*ph to dump small buffer

PATCH Superseded Andy Shevchenko 1 participant 1 message Sep 5, 2012

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 input: mouse: use %*ph to dump small buffer

---
 drivers/input/mouse/hgpk.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/input/mouse/hgpk.c +2 -5
index 575f880..5b17cc6 100644
@@ -334,11 +334,8 @@ static bool hgpk_is_byte_valid(struct psmouse *psmouse, unsigned char *packet)
 
 	if (!valid)
 		psmouse_dbg(psmouse,
-			    "bad data, mode %d (%d) %02x %02x %02x %02x %02x %02x\n",
-			    priv->mode, pktcnt,
-			    psmouse->packet[0], psmouse->packet[1],
-			    psmouse->packet[2], psmouse->packet[3],
-			    psmouse->packet[4], psmouse->packet[5]);
+			    "bad data, mode %d (%d) %*ph\n",
+			    priv->mode, pktcnt, 6, psmouse->packet);
 
 	return valid;
 }
Signature · 1 line
1.7.10.4