diff mbox series

[7/8] ALSA: firewire-tascam: Add missing annotation for tscm_hwdep_read_queue()

Message ID 20200311010908.42366-8-jbi.octave@gmail.com
State Not Applicable
Delegated to: David Miller
Headers show
Series Lock warning cleanups | expand

Commit Message

Jules Irenge March 11, 2020, 1:09 a.m. UTC
Sparse reports a warning at tscm_hwdep_read_queue()

warning: context imbalance in tscm_hwdep_read_queue() - unexpected unlock

The root cause is the missing annotation at tscm_hwdep_read_queue()
Add the missing __releases(&tscm->lock) annotation

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 sound/firewire/tascam/tascam-hwdep.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Takashi Sakamoto March 11, 2020, 3:19 a.m. UTC | #1
On Wed, Mar 11, 2020 at 01:09:07AM +0000, Jules Irenge wrote:
> Sparse reports a warning at tscm_hwdep_read_queue()
> 
> warning: context imbalance in tscm_hwdep_read_queue() - unexpected unlock
> 
> The root cause is the missing annotation at tscm_hwdep_read_queue()
> Add the missing __releases(&tscm->lock) annotation
> 
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
> ---
>  sound/firewire/tascam/tascam-hwdep.c | 1 +
>  1 file changed, 1 insertion(+)
 
This looks good.

Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

> diff --git a/sound/firewire/tascam/tascam-hwdep.c b/sound/firewire/tascam/tascam-hwdep.c
> index c29a97f6f638..9801e33e7f2a 100644
> --- a/sound/firewire/tascam/tascam-hwdep.c
> +++ b/sound/firewire/tascam/tascam-hwdep.c
> @@ -36,6 +36,7 @@ static long tscm_hwdep_read_locked(struct snd_tscm *tscm, char __user *buf,
>  
>  static long tscm_hwdep_read_queue(struct snd_tscm *tscm, char __user *buf,
>  				  long remained, loff_t *offset)
> +	__releases(&tscm->lock)
>  {
>  	char __user *pos = buf;
>  	unsigned int type = SNDRV_FIREWIRE_EVENT_TASCAM_CONTROL;
> -- 
> 2.24.1


Regards

Takashi Sakamoto
Takashi Iwai March 11, 2020, 6:56 a.m. UTC | #2
On Wed, 11 Mar 2020 02:09:07 +0100,
Jules Irenge wrote:
> 
> Sparse reports a warning at tscm_hwdep_read_queue()
> 
> warning: context imbalance in tscm_hwdep_read_queue() - unexpected unlock
> 
> The root cause is the missing annotation at tscm_hwdep_read_queue()
> Add the missing __releases(&tscm->lock) annotation
> 
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>

Applied, thanks.


Takashi
diff mbox series

Patch

diff --git a/sound/firewire/tascam/tascam-hwdep.c b/sound/firewire/tascam/tascam-hwdep.c
index c29a97f6f638..9801e33e7f2a 100644
--- a/sound/firewire/tascam/tascam-hwdep.c
+++ b/sound/firewire/tascam/tascam-hwdep.c
@@ -36,6 +36,7 @@  static long tscm_hwdep_read_locked(struct snd_tscm *tscm, char __user *buf,
 
 static long tscm_hwdep_read_queue(struct snd_tscm *tscm, char __user *buf,
 				  long remained, loff_t *offset)
+	__releases(&tscm->lock)
 {
 	char __user *pos = buf;
 	unsigned int type = SNDRV_FIREWIRE_EVENT_TASCAM_CONTROL;