summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Han <hanchunchao@inspur.com>2025-02-28 06:34:27 +0300
committerTakashi Iwai <tiwai@suse.de>2025-02-28 12:35:20 +0300
commit3abe3d342fc6a254e8b878d1e8c72c0ff980e68a (patch)
treedc1605926d38ff2f76436f3d82f7020d3510f8ed
parent7fa25e87fecbba89fe9c87b2d902976b42efda32 (diff)
downloadlinux-3abe3d342fc6a254e8b878d1e8c72c0ff980e68a.tar.xz
ALSA: seq: seq_oss_event: fix inconsistent indenting warning in note_on_event()
Fix below inconsistent indenting smatch warning. smatch warnings: sound/core/seq/oss/seq_oss_event.c:297 note_on_event() warn: inconsistent indenting Signed-off-by: Charles Han <hanchunchao@inspur.com> Link: https://patch.msgid.link/20250228033427.7056-1-hanchunchao@inspur.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/core/seq/oss/seq_oss_event.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/core/seq/oss/seq_oss_event.c b/sound/core/seq/oss/seq_oss_event.c
index 7b7c925dd3aa..76fb81077eef 100644
--- a/sound/core/seq/oss/seq_oss_event.c
+++ b/sound/core/seq/oss/seq_oss_event.c
@@ -290,16 +290,14 @@ note_on_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, st
if (note == 255 && info->ch[ch].note >= 0) {
/* volume control */
int type;
- //if (! vel)
- /* set volume to zero -- note off */
- // type = SNDRV_SEQ_EVENT_NOTEOFF;
- //else
- if (info->ch[ch].vel)
+
+ if (info->ch[ch].vel)
/* sample already started -- volume change */
type = SNDRV_SEQ_EVENT_KEYPRESS;
else
/* sample not started -- start now */
type = SNDRV_SEQ_EVENT_NOTEON;
+
info->ch[ch].vel = vel;
return set_note_event(dp, dev, type, ch, info->ch[ch].note, vel, ev);
} else if (note >= 128)