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:23:02 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.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
after addressing below nit-picks.
...
> +static inline void ssp_pending_add(struct ssp_data *data,
> + struct ssp_msg *msg)
It's perfectly a single line (we have limit 80, so up to and including 80 is
allowed).
static inline void ssp_pending_add(struct ssp_data *data, struct ssp_msg *msg)
(it's only 78 here).
...
> +static inline void ssp_pending_del(struct ssp_data *data,
> + struct ssp_msg *msg)
Ditto.
--
With Best Regards,
Andy Shevchenko