[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250819194430.4525-1-mohammed.guermoud@gmail.com>
Date: Tue, 19 Aug 2025 20:44:30 +0100
From: Mohammed Guermoud <mohammed.guermoud@...il.com>
To: marvin24@....de,
gregkh@...uxfoundation.org
Cc: ac100@...ts.launchpad.net,
linux-tegra@...r.kernel.org,
linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Mohammed Guermoud <mohammed.guermoud@...il.com>
Subject: [PATCH v3] staging: nvec: Remove unused NVEC_PHD macro
The NVEC_PHD macro is a debugging helper that is only enabled when
NVEC_PS2_DEBUG is defined. As this flag is never defined in the kernel,
the macro and all of its call sites are dead code.
As suggested by Greg Kroah-Hartman, removing the code is the cleanest
solution.
Signed-off-by: Mohammed Guermoud <mohammed.guermoud@...il.com>
---
v3: Fix commit message.
v2: version caused a build error. It's better to just delete the
code instead of trying to silence the warning.
drivers/staging/nvec/nvec_ps2.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/drivers/staging/nvec/nvec_ps2.c b/drivers/staging/nvec/nvec_ps2.c
index 7accdcafeeac..2e36893e0008 100644
--- a/drivers/staging/nvec/nvec_ps2.c
+++ b/drivers/staging/nvec/nvec_ps2.c
@@ -23,14 +23,6 @@
#define DISABLE_MOUSE 0xf5
#define PSMOUSE_RST 0xff
-#ifdef NVEC_PS2_DEBUG
-#define NVEC_PHD(str, buf, len) \
- print_hex_dump(KERN_DEBUG, str, DUMP_PREFIX_NONE, \
- 16, 1, buf, len, false)
-#else
-#define NVEC_PHD(str, buf, len) do { (void)str; (void)buf; (void)len; } while (0)
-#endif
-
enum ps2_subcmds {
SEND_COMMAND = 1,
RECEIVE_N,
@@ -70,18 +62,13 @@ static int nvec_ps2_notifier(struct notifier_block *nb,
case NVEC_PS2_EVT:
for (i = 0; i < msg[1]; i++)
serio_interrupt(ps2_dev.ser_dev, msg[2 + i], 0);
- NVEC_PHD("ps/2 mouse event: ", &msg[2], msg[1]);
return NOTIFY_STOP;
case NVEC_PS2:
if (msg[2] == 1) {
for (i = 0; i < (msg[1] - 2); i++)
serio_interrupt(ps2_dev.ser_dev, msg[i + 4], 0);
- NVEC_PHD("ps/2 mouse reply: ", &msg[4], msg[1] - 2);
}
-
- else if (msg[1] != 2) /* !ack */
- NVEC_PHD("unhandled mouse event: ", msg, msg[1] + 2);
return NOTIFY_STOP;
}
--
2.50.1
Powered by blists - more mailing lists