Re: [PATCH 1/5] m68k: Fix atari mouse movement
From: Michael Schmitz <schmitzmic@gmail.com>
Date: 2026-08-14 23:15:40
Also in:
linux-m68k
Hi Geert, thanks for your review! Am 14.08.2026 um 19:53 schrieb Geert Uytterhoeven:
Hi Michael, CC linux-input On Fri, 14 Aug 2026 at 05:17, Michael Schmitz [off-list ref] wrote:quoted
From: Miro Kropacek <redacted> Kernels are built with -funsigned-char since version 6.2, resulting in signed mouse position deltas getting misinterpreted as unsigned. Cast deltas passed in (unsigned) scancode buffer to correctly interpret sign. Fixes: 3bc753c06dd02a35 ("kbuild: treat char as always unsigned") Link: https://lists.debian.org/debian-68k/2026/08/msg00000.html Signed-off-by: Miro Kropacek <redacted> Reviewed-by: Michael Schmitz <schmitzmic@gmail.com>Since you're now in the path to upstream, you should add your SoB here (applies to all patches).quoted
--- a/drivers/input/mouse/atarimouse.c +++ b/drivers/input/mouse/atarimouse.c@@ -70,9 +70,12 @@ static void atamouse_interrupt(char *buf)Alternative, you could change/restore the function's signature to take a "signed char *".
Agreed, but without a way to test this, I'd rather wait for Miro confirming that change also fixed the issue. Cheers, Michael
quoted
atari_mouse_buttons = buttons; #endif - /* only relative events get here */ - dx = buf[1]; - dy = buf[2]; + /* only relative events get here; the IKBD sends signed 8-bit + * deltas, and the kernel builds with -funsigned-char since 6.2, + * so an explicit signed cast is required + */ + dx = (s8)buf[1]; + dy = (s8)buf[2]; input_report_rel(atamouse_dev, REL_X, dx); input_report_rel(atamouse_dev, REL_Y, dy);Regardless: Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds