Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ALSA: mtpav: restore negation dropped in guard() conversion
@ 2026-10-20  9:09 Wang Yan
  2026-10-20 10:58 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Yan @ 2026-10-20  9:09 UTC (permalink / raw)
  To: perex, tiwai; +Cc: wangyan01, runyu.xiao, linux-sound, linux-kernel

commit 316e0074ecdc ("ALSA: mtpav: Use guard() for spin locks")
claims to be "Merely code refactoring, and no behavior change", but
it accidentally dropped the "!" from

        if (! (portp->mode & MTPAV_MODE_OUTPUT_TRIGGERED))

in snd_mtpav_output_trigger().

Restore the negation.

Signed-off-by: Wang Yan <wangyan01@kylinos.cn>
---
 sound/drivers/mtpav.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c
index 1ed6d4f0cb62..288a873a27e6 100644
--- a/sound/drivers/mtpav.c
+++ b/sound/drivers/mtpav.c
@@ -443,7 +443,7 @@ static void snd_mtpav_output_trigger(struct snd_rawmidi_substream *substream, in
 
 	scoped_guard(spinlock_irqsave, &mtp_card->spinlock) {
 		if (up) {
-			if ((portp->mode & MTPAV_MODE_OUTPUT_TRIGGERED)) {
+			if (!(portp->mode & MTPAV_MODE_OUTPUT_TRIGGERED)) {
 				if (mtp_card->istimer++ == 0)
 					snd_mtpav_add_output_timer(mtp_card);
 				portp->mode |= MTPAV_MODE_OUTPUT_TRIGGERED;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: mtpav: restore negation dropped in guard() conversion
  2026-10-20  9:09 [PATCH] ALSA: mtpav: restore negation dropped in guard() conversion Wang Yan
@ 2026-10-20 10:58 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-10-20 10:58 UTC (permalink / raw)
  To: Wang Yan; +Cc: perex, tiwai, runyu.xiao, linux-sound, linux-kernel

On Tue, 20 Oct 2026 11:09:59 +0200,
Wang Yan wrote:
> 
> commit 316e0074ecdc ("ALSA: mtpav: Use guard() for spin locks")
> claims to be "Merely code refactoring, and no behavior change", but
> it accidentally dropped the "!" from
> 
>         if (! (portp->mode & MTPAV_MODE_OUTPUT_TRIGGERED))
> 
> in snd_mtpav_output_trigger().
> 
> Restore the negation.
> 
> Signed-off-by: Wang Yan <wangyan01@kylinos.cn>

Applied now.  Thanks.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-20 10:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-20  9:09 [PATCH] ALSA: mtpav: restore negation dropped in guard() conversion Wang Yan
2026-10-20 10:58 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox