Re: [PATCH v3] Input: joydev - avoid signed overflow in the broken-axis correction
From: Guanglei Zhu
Date: Wed Nov 04 2026 - 01:03:08 EST
Verified your rework with a three-way comparison (old / v3 / a
64-bit reference), compiled with -fno-strict-overflow: identical
output for in-range coefficients, all the boundaries (value ==
coef[0], value == coef[1], the dead zone, malformed coef[0] >
coef[1]) and CORR_NONE, and the wrap case behaves as you described -
coef[0] = coef[2] = INT_MAX with a large axis value makes the old
code return -5 where the 64-bit math saturates to -32767, and v3
matches the reference throughout.