From: Michael Schmitz <schmitzmic@gmail.com>
To: linux-m68k@vger.kernel.org, geert@linux-m68k.org
Cc: schmitzmic@gmail.com, Miro Kropacek <miro.kropacek@gmail.com>
Subject: [PATCH 1/5] m68k: Fix atari mouse movement
Date: Fri, 14 Aug 2026 15:17:41 +1200 [thread overview]
Message-ID: <20260814031745.17140-2-schmitzmic@gmail.com> (raw)
In-Reply-To: <20260814031745.17140-1-schmitzmic@gmail.com>
From: Miro Kropacek <miro.kropacek@gmail.com>
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 <miro.kropacek@gmail.com>
Reviewed-by: Michael Schmitz <schmitzmic@gmail.com>
---
drivers/input/mouse/atarimouse.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/input/mouse/atarimouse.c b/drivers/input/mouse/atarimouse.c
index b1219cc4d9a2..351aab69e905 100644
--- a/drivers/input/mouse/atarimouse.c
+++ b/drivers/input/mouse/atarimouse.c
@@ -70,9 +70,12 @@ static void atamouse_interrupt(char *buf)
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);
--
2.17.1
next prev parent reply other threads:[~2026-08-14 3:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 3:17 [PATCH 0/5] m68k SuperVidel patches Michael Schmitz
2026-08-14 3:17 ` Michael Schmitz [this message]
2026-08-14 7:53 ` [PATCH 1/5] m68k: Fix atari mouse movement Geert Uytterhoeven
2026-08-14 3:17 ` [PATCH 2/5] fbdev: Give atafb proper parent Michael Schmitz
2026-08-14 7:50 ` Helge Deller
2026-08-14 3:17 ` [PATCH 3/5] fbdev: Add support for further video bit depths on atafb:external Michael Schmitz
2026-08-14 3:17 ` [PATCH 4/5] fbdev: Add support for SuperVidel's SuperBlitter Michael Schmitz
2026-08-14 3:17 ` [PATCH 5/5] m68k: Add support for Svethlana Michael Schmitz
2026-08-14 8:07 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260814031745.17140-2-schmitzmic@gmail.com \
--to=schmitzmic@gmail.com \
--cc=geert@linux-m68k.org \
--cc=linux-m68k@vger.kernel.org \
--cc=miro.kropacek@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox