[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251202033120.2264474-1-vivek.balachandhar@gmail.com>
Date: Tue, 2 Dec 2025 03:31:20 +0000
From: Vivek BalachandharTN <vivek.balachandhar@...il.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...nel.org>,
Vivek Balachandhar TN <vivek.balachandhar@...il.com>
Subject: [PATCH] input: byd: use %*ph for Z packet dump
Replace the hand-rolled %02x formatting of the Z packet warning in the
BYD driver with the %*ph format specifier. %*ph is the preferred helper
for printing a buffer in hexadecimal and makes the logging clearer and
more consistent.
Signed-off-by: Vivek BalachandharTN <vivek.balachandhar@...il.com>
---
drivers/input/mouse/byd.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/input/mouse/byd.c b/drivers/input/mouse/byd.c
index 71aa23dd7d8d..a1420f03f3b3 100644
--- a/drivers/input/mouse/byd.c
+++ b/drivers/input/mouse/byd.c
@@ -315,9 +315,8 @@ static psmouse_ret_t byd_process_byte(struct psmouse *psmouse)
}
default:
psmouse_warn(psmouse,
- "Unrecognized Z: pkt = %02x %02x %02x %02x\n",
- psmouse->packet[0], psmouse->packet[1],
- psmouse->packet[2], psmouse->packet[3]);
+ "Unrecognized Z: pkt = %*ph\n",
+ 4, psmouse->packet);
return PSMOUSE_BAD_DATA;
}
--
2.34.1
Powered by blists - more mailing lists