Re: [PATCH 4/4] input: joystick: Fix buffer data parsing
From: Andy Shevchenko <hidden>
Date: 2022-08-19 08:22:11
Also in:
linux-iio, linux-mips, lkml
From: Andy Shevchenko <hidden>
Date: 2022-08-19 08:22:11
Also in:
linux-iio, linux-mips, lkml
On Wed, Aug 17, 2022 at 1:58 PM Artur Rojek [off-list ref] wrote:
Don't try to access buffer data of a channel by its scan index. Instead, use the newly introduced `iio_find_channel_offset_in_buffer` to get the correct data offset. The scan index of a channel does not represent its position in a buffer, as the buffer will contain data for enabled channels only, affecting data offsets and alignment.
Fixes: 2c2b364fddd5 ("Input: joystick - add ADC attached joystick driver.")You may not use Fixes here because it has dependencies. The possible solutions are: 1/ a) create a real fix for the existing code; b) refactor it. 2/ put the Fixes tag to all dependencies (which is questionable).
Reported-by: Chris Morgan <redacted> Tested-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Artur Rojek <redacted>
Try to keep tags in chronological order, I do not believe the change may be tested before it has been created. -- With Best Regards, Andy Shevchenko