Re: [PATCH 3/5] Input: ads7846 - remove unneeded memory barriers

From: Linus Walleij

Date: Sat Nov 21 2026 - 15:41:30 EST


On Thu, Nov 12, 2026 at 7:50 AM Dmitry Torokhov
<dmitry.torokhov@xxxxxxxxx> wrote:

> The driver invokes mb() after setting the stopped flag in ads7846_stop()
> and ads7846_restart(). These mandatory barriers lack pairing barriers on
> the reader side and are unnecessary.
>
> The wait queue operations wake_up() and wait_event_timeout(), along
> with disable_irq() and enable_irq(), already provide the required
> synchronization and memory ordering when stopping and restarting the
> device polling. Remove the redundant barriers.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>

Weird, probably cargo-cult code.
Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>

Yours,
Linus Walleij