]> Git Repo - linux.git/commitdiff
spi: atmel: Add missing annotation for atmel_spi_next_xfer_dma_submit()
authorJules Irenge <[email protected]>
Wed, 29 Apr 2020 22:57:23 +0000 (23:57 +0100)
committerMark Brown <[email protected]>
Thu, 30 Apr 2020 14:35:25 +0000 (15:35 +0100)
Sparse reports a warning at atmel_spi_next_xfer_dma_submit()

warning: context imbalance in atmel_spi_next_xfer_dma_submit()
- unexpected unlock

The root cause is the missing annotation
at atmel_spi_next_xfer_dma_submit()

Add the missing __must_hold(&as->lock) annotation

Signed-off-by: Jules Irenge <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
drivers/spi/spi-atmel.c

index 013458cabe3c6f05e2b47fa4384d87295ab4206b..57ee8c3b7972c005b3e56e63a84260b5d45d90fb 100644 (file)
@@ -706,6 +706,7 @@ static void atmel_spi_next_xfer_pio(struct spi_master *master,
 static int atmel_spi_next_xfer_dma_submit(struct spi_master *master,
                                struct spi_transfer *xfer,
                                u32 *plen)
+       __must_hold(&as->lock)
 {
        struct atmel_spi        *as = spi_master_get_devdata(master);
        struct dma_chan         *rxchan = master->dma_rx;
This page took 0.057811 seconds and 4 git commands to generate.