[PATCH v2 1/5] ASoC: mchp-spdifrx: disable end of block interrupt on failures

Mark Brown broonie at kernel.org
Tue Jul 26 03:45:31 PDT 2022


On Mon, Jul 25, 2022 at 04:09:21PM +0300, Claudiu Beznea wrote:

> +++ b/sound/soc/atmel/mchp-spdifrx.c
> @@ -288,15 +288,17 @@ static void mchp_spdifrx_isr_blockend_en(struct mchp_spdifrx_dev *dev)
>  	spin_unlock_irqrestore(&dev->blockend_lock, flags);
>  }
>  
> -/* called from atomic context only */
> +/* called from atomic/non-atomic context */
>  static void mchp_spdifrx_isr_blockend_dis(struct mchp_spdifrx_dev *dev)
>  {
> -	spin_lock(&dev->blockend_lock);
> +	unsigned int flags;
> +
> +	spin_lock_irqsave(&dev->blockend_lock);
>  	dev->blockend_refcount--;
>  	/* don't enable BLOCKEND interrupt if it's already enabled */
>  	if (dev->blockend_refcount == 0)
>  		regmap_write(dev->regmap, SPDIFRX_IDR, SPDIFRX_IR_BLOCKEND);
> -	spin_unlock(&dev->blockend_lock);
> +	spin_unlock_irqrestore(&dev->blockend_lock);
>  }

This breaks an x86_64 allmodconfig build:

/build/stage/linux/sound/soc/atmel/mchp-spdifrx.c: In function ‘mchp_spdifrx_isr_blockend_dis’:
/build/stage/linux/sound/soc/atmel/mchp-spdifrx.c:296:46: error: macro "spin_lock_irqsave" requires 2 arguments, but only 1 given
  296 |         spin_lock_irqsave(&dev->blockend_lock);
      |                                              ^
In file included from /build/stage/linux/include/linux/rwsem.h:15,
                 from /build/stage/linux/include/linux/notifier.h:15,
                 from /build/stage/linux/include/linux/clk.h:14,
                 from /build/stage/linux/sound/soc/atmel/mchp-spdifrx.c:9:
/build/stage/linux/include/linux/spinlock.h:377: note: macro "spin_lock_irqsave" defined here
  377 | #define spin_lock_irqsave(lock, flags)                          \
      | 
/build/stage/linux/sound/soc/atmel/mchp-spdifrx.c:296:9: error: ‘spin_lock_irqsave’ undeclared (first use in this function); did you mean ‘spin_lock_irq’?
  296 |         spin_lock_irqsave(&dev->blockend_lock);
      |         ^~~~~~~~~~~~~~~~~
      |         spin_lock_irq
/build/stage/linux/sound/soc/atmel/mchp-spdifrx.c:296:9: note: each undeclared identifier is reported only once for each function it appears in
/build/stage/linux/sound/soc/atmel/mchp-spdifrx.c:301:9: error: too few arguments to function ‘spin_unlock_irqrestore’
  301 |         spin_unlock_irqrestore(&dev->blockend_lock);
      |         ^~~~~~~~~~~~~~~~~~~~~~
In file included from /build/stage/linux/include/linux/rwsem.h:15,
                 from /build/stage/linux/include/linux/notifier.h:15,
                 from /build/stage/linux/include/linux/clk.h:14,
                 from /build/stage/linux/sound/soc/atmel/mchp-spdifrx.c:9:
/build/stage/linux/include/linux/spinlock.h:402:29: note: declared here
  402 | static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
      |                             ^~~~~~~~~~~~~~~~~~~~~~
/build/stage/linux/sound/soc/atmel/mchp-spdifrx.c:294:22: error: unused variable ‘flags’ [-Werror=unused-variable]
  294 |         unsigned int flags;
      |                      ^~~~~
cc1: all warnings being treated as errors
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220726/31eeeee9/attachment.sig>


More information about the linux-arm-kernel mailing list