Re: [PATCH v5] m68k: Fix atari mouse movement
From: Dmitry Torokhov
Date: Thu Oct 22 2026 - 18:51:57 EST
On Wed, Oct 21, 2026 at 09:32:00AM +0200, Geert Uytterhoeven wrote:
> On Wed, 21 Oct 2026 at 04:51, Michael Schmitz <schmitzmic@xxxxxxxxx> wrote:
> > Am 21.10.2026 um 15:23 schrieb Miro Kropacek:
> > > Kernels are built with -funsigned-char since version 6.2, resulting in
> > > the signed 8-bit position deltas reported by the IKBD being
> > > misinterpreted as unsigned.
> > >
> > > The hook is handed a raw IKBD packet, so take it as a byte stream and
> > > apply the sign to the two displacement values alone.
> > >
> > > Fixes: 3bc753c06dd02a35 ("kbuild: treat char as always unsigned")
> > > Link: https://lists.debian.org/debian-68k/2026/08/msg00000.html
> > > Suggested-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> > > Signed-off-by: Miro Kropacek <miro.kropacek@xxxxxxxxx>
> > > Cc: linux-input <linux-input@xxxxxxxxxxxxxxx>
> > > ---
> > >
> > > Changes in v5:
> > >
> > > - take the packet as u8 * and cast only the two displacement values,
> > > as suggested; this drops the call-site cast v4 needed, and with it
> > > the -Wpointer-sign warning
> > > - add the types include atarikb.h now relies on
> > >
> > > The same cast of the two displacement values was tested on an Atari
> > > Falcon030 with CT60 in v1 of this patch; v5 differs from it only in the
> > > type of the hook argument.
> > >
> > > Michael's Reviewed-by from v3 is dropped, as the approach has changed
> > > twice since.
> >
> > Dmitry's reasoning makes sense to me, so we're back on v1 with no change
> > in functionality.
>
> If it's just a byte stream, one might not bother doing s/char/u8/, as both
> are the same type anyway... and then we're really back at v1.
I'd prefer to have u8 at least in input.
>
> > Looks good to me, feel free to add my Reviewed-by if it helps get this
> > merged.
>
> Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> for the arch/m68k files:
> Acked-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Could you please re-post v1? Can;t seem to find it.
Thanks.
--
Dmitry