Re: [PATCH v6 3/7] iio: ssp_sensors: factor out pending list add/remove helper(s)

From: Andy Shevchenko

Date: Wed Apr 15 2026 - 05:33:28 EST


On Wed, Apr 15, 2026 at 10:37:45AM +0530, Sanjay Chitroda wrote:

> The SSP SPI transfer path manipulates the pending message list in
> multiple places, each time open-coding the same locking and list
> operations.
>
> Re-factor the pending list add and delete logic into small helper
> functions and drop use_no_irq variable to avoid duplication and
> simplify transfer flow to follow.
>
> No functional change intended.

...

> - /*
> - * check if this is a short one way message or the whole transfer has
> - * second part after an interrupt
> - */

One more thing, please, move this comment to the same condition in ssp_pending_add().
The ssp_pending_del() can survive without it as they are close to each other. Or you
can add a short one to refer to the comment in ssp_pending_add().

While moving, fix the style as well.

/*
* Check if this is a short one way message or the whole transfer has
* second part after an interrupt.
*/

--
With Best Regards,
Andy Shevchenko