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>,
linux-input <linux-input@vger.kernel.org>
Subject: [PATCH v2 1/5] m68k: Fix atari mouse movement
Date: Sun, 16 Aug 2026 19:37:48 +1200 [thread overview]
Message-ID: <20260816073752.16656-2-schmitzmic@gmail.com> (raw)
In-Reply-To: <20260816073752.16656-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>
Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
Cc: linux-input <linux-input@vger.kernel.org>
---
Changes in v2:
- change atamouse_interrupt function signature to signed char *,
drop signed casts (Geert)
---
arch/m68k/atari/atakeyb.c | 2 +-
arch/m68k/include/asm/atarikb.h | 2 +-
drivers/input/mouse/atarimouse.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/m68k/atari/atakeyb.c b/arch/m68k/atari/atakeyb.c
index 49a9a459bdf4..86ab73a79177 100644
--- a/arch/m68k/atari/atakeyb.c
+++ b/arch/m68k/atari/atakeyb.c
@@ -39,7 +39,7 @@ void (*atari_MIDI_interrupt_hook) (void);
/* Hook for keyboard inputdev driver */
void (*atari_input_keyboard_interrupt_hook) (unsigned char, char);
/* Hook for mouse inputdev driver */
-void (*atari_input_mouse_interrupt_hook) (char *);
+void (*atari_input_mouse_interrupt_hook)(signed char *buf);
EXPORT_SYMBOL(atari_input_keyboard_interrupt_hook);
EXPORT_SYMBOL(atari_input_mouse_interrupt_hook);
diff --git a/arch/m68k/include/asm/atarikb.h b/arch/m68k/include/asm/atarikb.h
index 68f3622bf591..c5a84c7ee85d 100644
--- a/arch/m68k/include/asm/atarikb.h
+++ b/arch/m68k/include/asm/atarikb.h
@@ -37,7 +37,7 @@ extern void (*atari_MIDI_interrupt_hook) (void);
/* Hook for keyboard inputdev driver */
extern void (*atari_input_keyboard_interrupt_hook) (unsigned char, char);
/* Hook for mouse inputdev driver */
-extern void (*atari_input_mouse_interrupt_hook) (char *);
+extern void (*atari_input_mouse_interrupt_hook)(signed char *buf);
int atari_keyb_init(void);
diff --git a/drivers/input/mouse/atarimouse.c b/drivers/input/mouse/atarimouse.c
index b1219cc4d9a2..6bac2288c494 100644
--- a/drivers/input/mouse/atarimouse.c
+++ b/drivers/input/mouse/atarimouse.c
@@ -60,7 +60,7 @@ extern int atari_mouse_buttons;
static struct input_dev *atamouse_dev;
-static void atamouse_interrupt(char *buf)
+static void atamouse_interrupt(signed char *buf)
{
int buttons, dx, dy;
--
2.17.1
next prev parent reply other threads:[~2026-08-16 7:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-16 7:37 [PATCH v2 0/5] m68k SuperVidel patches Michael Schmitz
2026-08-16 7:37 ` Michael Schmitz [this message]
2026-08-17 8:00 ` [PATCH v2 1/5] m68k: Fix atari mouse movement Geert Uytterhoeven
2026-08-16 7:37 ` [PATCH v2 2/5] fbdev: Give atafb proper parent Michael Schmitz
2026-08-16 14:38 ` Helge Deller
2026-08-16 18:37 ` Michael Schmitz
2026-08-17 6:34 ` Thomas Zimmermann
2026-08-17 7:49 ` Michael Schmitz
2026-08-17 7:57 ` Thomas Zimmermann
2026-08-16 7:37 ` [PATCH v2 3/5] fbdev: Add support for further video bit depths on atafb:external Michael Schmitz
2026-08-16 7:37 ` [PATCH v2 4/5] fbdev: Add support for SuperVidel's SuperBlitter Michael Schmitz
2026-08-16 7:37 ` [PATCH v2 5/5] m68k: Add support for Svethlana Michael Schmitz
2026-08-17 7:14 ` Geert Uytterhoeven
2026-08-17 8:50 ` Geert Uytterhoeven
2026-08-17 8:52 ` 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=20260816073752.16656-2-schmitzmic@gmail.com \
--to=schmitzmic@gmail.com \
--cc=geert@linux-m68k.org \
--cc=linux-input@vger.kernel.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