28 Jan
2022
28 Jan
'22
2:31 p.m.
On Fri, Jan 28, 2022 at 12:42:04PM +0000, Mark Brown wrote:
On Fri, Jan 28, 2022 at 02:20:07PM +0300, Dan Carpenter wrote:
The "val" and "val2" variables need to signed for the checking to work as intended.
This means that the helpers won't support controls that use the top bit of a 32 bit register.
Fine, I can delete the checks for negative instead (I'm surprised you haven't already received a dozen bot emails about this).
I haven't been able to figure out where mc->min/max are set. In snd_soc_get_xr_sx() it checks whether "mc->min" is negative.
if (min < 0 && val > max) val |= ~mask;
Is that a bug? If mc->min is negative the math gets tricky.
regards, dan carpenter