* [PATCH v2] staging: nvec: Remove unused NVEC_PHD macro
@ 2025-08-18 20:38 Mohammed Guermoud
2025-08-19 6:05 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Mohammed Guermoud @ 2025-08-18 20:38 UTC (permalink / raw)
To: marvin24, gregkh
Cc: ac100, linux-tegra, linux-staging, linux-kernel,
Mohammed Guermoud, kernel test robot
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. This also fixes a build error discovered by the kernel test
robot after the v1 patch modified the macro's body.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508182005.4PiKxXcN-lkp@intel.com/
Signed-off-by: Mohammed Guermoud <mohammed.guermoud@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] staging: nvec: Remove unused NVEC_PHD macro
2025-08-18 20:38 [PATCH v2] staging: nvec: Remove unused NVEC_PHD macro Mohammed Guermoud
@ 2025-08-19 6:05 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2025-08-19 6:05 UTC (permalink / raw)
To: Mohammed Guermoud
Cc: marvin24, gregkh, ac100, linux-tegra, linux-staging, linux-kernel,
kernel test robot
On Mon, Aug 18, 2025 at 09:38:55PM +0100, Mohammed Guermoud wrote:
> 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. This also fixes a build error discovered by the kernel test
> robot after the v1 patch modified the macro's body.
We don't reference v1 here. We would do it under the --- cut off.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202508182005.4PiKxXcN-lkp@intel.com/
Don't add these tags. They're just confusing because we never merged v1.
> Signed-off-by: Mohammed Guermoud <mohammed.guermoud@gmail.com>
> ---
Here you would put a comment like:
v2: version caused a build error. It's better to just delete the
code instead of trying to silence the warning.
Please send v3 with a comment:
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.
https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-19 6:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-18 20:38 [PATCH v2] staging: nvec: Remove unused NVEC_PHD macro Mohammed Guermoud
2025-08-19 6:05 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).