Re: [PATCH] HID: pidff: bound the unit exponent rescaling loop
From: Tomasz Pakuła
Date: Mon Nov 02 2026 - 12:44:02 EST
On Mon, 2026-11-02 at 22:40 +0800, Shengzhuo Wei wrote:
> Hi Tomasz,
>
> Thanks for testing and reviewing the patch.
>
> > Should we maybe add a warning to the driver that the time exponent might
> > be out of a sane range? Sane range being, say, 10 to 0? This of course
> > would have to happen during init stage not to spam dmesg.
>
> For the initialization-time warning, would -8 to 0 be a reasonable
> exponent range?
Yes, I meant to say -10 (not positive 10 obviously) but -8 seems like a
better fit here.
> - -8 is the lowest exponent in the commonly used signed 4-bit HID
> encoding.
> - 0 allows a time unit of one second.
> - Positive exponents 1 through 7 would give time units of ten seconds
> or more, which seem unusually coarse for force-feedback effects.
>
> This would only be a warning threshold: the driver would still accept
> the device and leave the rescaling behavior unchanged.
>
> Does that match what you had in mind, or would you prefer a different
> range?
Yup, that range is great.
>
> Thanks,
> Shengzhuo