]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Input: byd - use %*ph for Z packet dump
authorVivek BalachandharTN <vivek.balachandhar@gmail.com>
Tue, 2 Dec 2025 03:31:20 +0000 (03:31 +0000)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 9 Dec 2025 07:14:29 +0000 (23:14 -0800)
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@gmail.com>
Link: https://patch.msgid.link/20251202033120.2264474-1-vivek.balachandhar@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/byd.c

index 71aa23dd7d8d038467b24f6d4b58ea834256721f..7f85c7ab68c5c83d31270a92defe4d085e0d5a3e 100644 (file)
@@ -314,10 +314,8 @@ static psmouse_ret_t byd_process_byte(struct psmouse *psmouse)
                break;
        }
        default:
-               psmouse_warn(psmouse,
-                            "Unrecognized Z: pkt = %02x %02x %02x %02x\n",
-                            psmouse->packet[0], psmouse->packet[1],
-                            psmouse->packet[2], psmouse->packet[3]);
+               psmouse_warn(psmouse, "Unrecognized Z: pkt = %*ph\n",
+                            4, psmouse->packet);
                return PSMOUSE_BAD_DATA;
        }