Re: [PATCH v5 3/5] iio: ssp_sensors: factor out pending list add/remove helpers
From: Andy Shevchenko
Date: Wed Apr 08 2026 - 07:37:24 EST
On Wed, Apr 08, 2026 at 07:32:48AM +0000, Sanjay Embedded_SE wrote:
> On 7 April 2026 1:34:41 am IST, Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> >On Mon, Apr 06, 2026 at 01:38:50PM +0530, Sanjay Chitroda wrote:
...
> >Suggested-by?
>
> Requesting your input on which email is recommended to tag with your name.
>
> Shall I use intel.com ?
The one that was used in the message which suggested this change. I don't
remember which one I have used.
...
> >> +static inline void ssp_pending_add(struct ssp_data *data,
> >> + struct ssp_msg *msg)
> >
> >Make it rather:
> >
> >static inline void ssp_pending_add(struct ssp_data *data, struct ssp_msg *msg)
> >{
> > if (msg->length)
> > return;
> > ...
> >}
> It should be not, right ?
Yes, too many negations, perhaps even better to spell it as msg->length == 0.
> {
> if (!msg->length)
> return;
> ...
> }
>
> const bool use_no_irq = msg->length == 0;
> if (!use_no_irq) {add/del}
> If message length is 0 then no interrupt
--
With Best Regards,
Andy Shevchenko