Commit 0744ae87 authored by Jason A. Donenfeld's avatar Jason A. Donenfeld Committed by sanglipeng
Browse files

Input: focaltech - use explicitly signed char type

stable inclusion
from stable-v5.10.177
commit 8b3d7ad3e8f13a90d56c4d6b3b4eee78634615ab
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I88YNP

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8b3d7ad3e8f13a90d56c4d6b3b4eee78634615ab



--------------------------------

commit 8980f190 upstream.

The recent change of -funsigned-char causes additions of negative
numbers to become additions of large positive numbers, leading to wrong
calculations of mouse movement. Change these casts to be explicitly
signed, to take into account negative offsets.

Fixes: 3bc753c0 ("kbuild: treat char as always unsigned")
Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Cc: stable@vger.kernel.org
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217211
Link: https://lore.kernel.org/r/20230318133010.1285202-1-Jason@zx2c4.com


Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 2d13c238
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment