Re: [PATCH v5 1/3] spi: tegra210-quad: Convert to hard IRQ with high-priority workqueue
From: Breno Leitao
Date: Wed Jul 08 2026 - 08:18:20 EST
On Wed, Jul 08, 2026 at 01:12:55AM +0000, Vishwaroop A wrote:
> + spin_lock_irqsave(&tqspi->lock, flags);
> + t = tqspi->curr_xfer;
> + spin_unlock_irqrestore(&tqspi->lock, flags);
> + if (!t)
I am still quite confused what tqspi->lock protects. In the code above,
you get the lock, then you dereference tqspi->curr_xfer, and then it
releases the lock, and use t later without any lock.
if tqspi->lock() is protecting curr_xfer, shouldn't you hold it for
longer?