* [PATCH] ALSA: seq: seq_oss_event: fix inconsistent indenting warning in note_on_event()
@ 2025-02-27 9:24 Charles Han
2025-02-27 10:21 ` Takashi Iwai
2025-02-28 3:34 ` [PATCH v2] " Charles Han
0 siblings, 2 replies; 4+ messages in thread
From: Charles Han @ 2025-02-27 9:24 UTC (permalink / raw)
To: perex, tiwai; +Cc: linux-sound, linux-kernel, Charles Han
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>
---
sound/core/seq/oss/seq_oss_event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/core/seq/oss/seq_oss_event.c b/sound/core/seq/oss/seq_oss_event.c
index 7b7c925dd3aa..9a42713c7bdd 100644
--- a/sound/core/seq/oss/seq_oss_event.c
+++ b/sound/core/seq/oss/seq_oss_event.c
@@ -294,7 +294,7 @@ note_on_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, st
/* 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
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ALSA: seq: seq_oss_event: fix inconsistent indenting warning in note_on_event()
2025-02-27 9:24 [PATCH] ALSA: seq: seq_oss_event: fix inconsistent indenting warning in note_on_event() Charles Han
@ 2025-02-27 10:21 ` Takashi Iwai
2025-02-28 3:34 ` [PATCH v2] " Charles Han
1 sibling, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2025-02-27 10:21 UTC (permalink / raw)
To: Charles Han; +Cc: perex, tiwai, linux-sound, linux-kernel
On Thu, 27 Feb 2025 10:24:41 +0100,
Charles Han wrote:
>
> 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>
> ---
> sound/core/seq/oss/seq_oss_event.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/core/seq/oss/seq_oss_event.c b/sound/core/seq/oss/seq_oss_event.c
> index 7b7c925dd3aa..9a42713c7bdd 100644
> --- a/sound/core/seq/oss/seq_oss_event.c
> +++ b/sound/core/seq/oss/seq_oss_event.c
> @@ -294,7 +294,7 @@ note_on_event(struct seq_oss_devinfo *dp, int dev, int ch, int note, int vel, st
> /* 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
I'd rather clean up the commented-out dead lines and fix the indent as
well. The indent was because of the "else" line.
Care to resubmit with that?
thanks,
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] ALSA: seq: seq_oss_event: fix inconsistent indenting warning in note_on_event()
2025-02-27 9:24 [PATCH] ALSA: seq: seq_oss_event: fix inconsistent indenting warning in note_on_event() Charles Han
2025-02-27 10:21 ` Takashi Iwai
@ 2025-02-28 3:34 ` Charles Han
2025-02-28 9:35 ` Takashi Iwai
1 sibling, 1 reply; 4+ messages in thread
From: Charles Han @ 2025-02-28 3:34 UTC (permalink / raw)
To: perex, tiwai; +Cc: linux-sound, linux-kernel, Charles Han
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>
---
sound/core/seq/oss/seq_oss_event.c | 8 +++-----
1 file 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)
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ALSA: seq: seq_oss_event: fix inconsistent indenting warning in note_on_event()
2025-02-28 3:34 ` [PATCH v2] " Charles Han
@ 2025-02-28 9:35 ` Takashi Iwai
0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2025-02-28 9:35 UTC (permalink / raw)
To: Charles Han; +Cc: perex, tiwai, linux-sound, linux-kernel
On Fri, 28 Feb 2025 04:34:27 +0100,
Charles Han wrote:
>
> 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>
Thanks, applied.
Takashi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-02-28 9:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-27 9:24 [PATCH] ALSA: seq: seq_oss_event: fix inconsistent indenting warning in note_on_event() Charles Han
2025-02-27 10:21 ` Takashi Iwai
2025-02-28 3:34 ` [PATCH v2] " Charles Han
2025-02-28 9:35 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox