* [PATCH] ALSA: use list_move_tail instead of list_del/list_add_tail
@ 2012-09-05 6:33 Wei Yongjun
2012-09-05 7:06 ` Clemens Ladisch
2012-09-05 7:40 ` Takashi Iwai
0 siblings, 2 replies; 5+ messages in thread
From: Wei Yongjun @ 2012-09-05 6:33 UTC (permalink / raw)
To: clemens, perex, tiwai; +Cc: yongjun_wei, alsa-devel, linux-kernel
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Using list_move_tail() instead of list_del() + list_add_tail().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
sound/drivers/opl4/opl4_synth.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/sound/drivers/opl4/opl4_synth.c b/sound/drivers/opl4/opl4_synth.c
index 49b9e24..4b91adc 100644
--- a/sound/drivers/opl4/opl4_synth.c
+++ b/sound/drivers/opl4/opl4_synth.c
@@ -504,8 +504,7 @@ void snd_opl4_note_on(void *private_data, int note, int vel, struct snd_midi_cha
spin_lock_irqsave(&opl4->reg_lock, flags);
for (i = 0; i < voices; i++) {
voice[i] = snd_opl4_get_voice(opl4);
- list_del(&voice[i]->list);
- list_add_tail(&voice[i]->list, &opl4->on_voices);
+ list_move_tail(&voice[i]->list, &opl4->on_voices);
voice[i]->chan = chan;
voice[i]->note = note;
voice[i]->velocity = vel & 0x7f;
@@ -555,8 +554,7 @@ void snd_opl4_note_on(void *private_data, int note, int vel, struct snd_midi_cha
static void snd_opl4_voice_off(struct snd_opl4 *opl4, struct opl4_voice *voice)
{
- list_del(&voice->list);
- list_add_tail(&voice->list, &opl4->off_voices);
+ list_move_tail(&voice->list, &opl4->off_voices);
voice->reg_misc &= ~OPL4_KEY_ON_BIT;
snd_opl4_write(opl4, OPL4_REG_MISC + voice->number, voice->reg_misc);
@@ -571,8 +569,7 @@ void snd_opl4_note_off(void *private_data, int note, int vel, struct snd_midi_ch
static void snd_opl4_terminate_voice(struct snd_opl4 *opl4, struct opl4_voice *voice)
{
- list_del(&voice->list);
- list_add_tail(&voice->list, &opl4->off_voices);
+ list_move_tail(&voice->list, &opl4->off_voices);
voice->reg_misc = (voice->reg_misc & ~OPL4_KEY_ON_BIT) | OPL4_DAMP_BIT;
snd_opl4_write(opl4, OPL4_REG_MISC + voice->number, voice->reg_misc);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ALSA: use list_move_tail instead of list_del/list_add_tail
2012-09-05 6:33 [PATCH] ALSA: use list_move_tail instead of list_del/list_add_tail Wei Yongjun
@ 2012-09-05 7:06 ` Clemens Ladisch
2012-09-05 7:40 ` Takashi Iwai
1 sibling, 0 replies; 5+ messages in thread
From: Clemens Ladisch @ 2012-09-05 7:06 UTC (permalink / raw)
To: Wei Yongjun, tiwai; +Cc: perex, yongjun_wei, alsa-devel, linux-kernel
Wei Yongjun wrote:
> Using list_move_tail() instead of list_del() + list_add_tail().
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ALSA: use list_move_tail instead of list_del/list_add_tail
2012-09-05 6:33 [PATCH] ALSA: use list_move_tail instead of list_del/list_add_tail Wei Yongjun
2012-09-05 7:06 ` Clemens Ladisch
@ 2012-09-05 7:40 ` Takashi Iwai
1 sibling, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2012-09-05 7:40 UTC (permalink / raw)
To: Wei Yongjun; +Cc: clemens, perex, yongjun_wei, alsa-devel, linux-kernel
At Wed, 5 Sep 2012 14:33:21 +0800,
Wei Yongjun wrote:
>
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Using list_move_tail() instead of list_del() + list_add_tail().
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Thanks, applied.
Takashi
> ---
> sound/drivers/opl4/opl4_synth.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/sound/drivers/opl4/opl4_synth.c b/sound/drivers/opl4/opl4_synth.c
> index 49b9e24..4b91adc 100644
> --- a/sound/drivers/opl4/opl4_synth.c
> +++ b/sound/drivers/opl4/opl4_synth.c
> @@ -504,8 +504,7 @@ void snd_opl4_note_on(void *private_data, int note, int vel, struct snd_midi_cha
> spin_lock_irqsave(&opl4->reg_lock, flags);
> for (i = 0; i < voices; i++) {
> voice[i] = snd_opl4_get_voice(opl4);
> - list_del(&voice[i]->list);
> - list_add_tail(&voice[i]->list, &opl4->on_voices);
> + list_move_tail(&voice[i]->list, &opl4->on_voices);
> voice[i]->chan = chan;
> voice[i]->note = note;
> voice[i]->velocity = vel & 0x7f;
> @@ -555,8 +554,7 @@ void snd_opl4_note_on(void *private_data, int note, int vel, struct snd_midi_cha
>
> static void snd_opl4_voice_off(struct snd_opl4 *opl4, struct opl4_voice *voice)
> {
> - list_del(&voice->list);
> - list_add_tail(&voice->list, &opl4->off_voices);
> + list_move_tail(&voice->list, &opl4->off_voices);
>
> voice->reg_misc &= ~OPL4_KEY_ON_BIT;
> snd_opl4_write(opl4, OPL4_REG_MISC + voice->number, voice->reg_misc);
> @@ -571,8 +569,7 @@ void snd_opl4_note_off(void *private_data, int note, int vel, struct snd_midi_ch
>
> static void snd_opl4_terminate_voice(struct snd_opl4 *opl4, struct opl4_voice *voice)
> {
> - list_del(&voice->list);
> - list_add_tail(&voice->list, &opl4->off_voices);
> + list_move_tail(&voice->list, &opl4->off_voices);
>
> voice->reg_misc = (voice->reg_misc & ~OPL4_KEY_ON_BIT) | OPL4_DAMP_BIT;
> snd_opl4_write(opl4, OPL4_REG_MISC + voice->number, voice->reg_misc);
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ALSA: use list_move_tail instead of list_del/list_add_tail
2012-09-05 7:00 Wei Yongjun
@ 2012-09-05 7:40 ` Takashi Iwai
0 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2012-09-05 7:40 UTC (permalink / raw)
To: Wei Yongjun; +Cc: perex, yongjun_wei, alsa-devel, linux-kernel
At Wed, 5 Sep 2012 15:00:15 +0800,
Wei Yongjun wrote:
>
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Using list_move_tail() instead of list_del() + list_add_tail().
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Applied this one, too. Thanks.
Takashi
> ---
> sound/pci/emu10k1/memory.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/pci/emu10k1/memory.c b/sound/pci/emu10k1/memory.c
> index 0a43662..1dce0a39 100644
> --- a/sound/pci/emu10k1/memory.c
> +++ b/sound/pci/emu10k1/memory.c
> @@ -263,8 +263,8 @@ int snd_emu10k1_memblk_map(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *b
> spin_lock_irqsave(&emu->memblk_lock, flags);
> if (blk->mapped_page >= 0) {
> /* update order link */
> - list_del(&blk->mapped_order_link);
> - list_add_tail(&blk->mapped_order_link, &emu->mapped_order_link_head);
> + list_move_tail(&blk->mapped_order_link,
> + &emu->mapped_order_link_head);
> spin_unlock_irqrestore(&emu->memblk_lock, flags);
> return 0;
> }
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ALSA: use list_move_tail instead of list_del/list_add_tail
@ 2012-09-05 7:00 Wei Yongjun
2012-09-05 7:40 ` Takashi Iwai
0 siblings, 1 reply; 5+ messages in thread
From: Wei Yongjun @ 2012-09-05 7:00 UTC (permalink / raw)
To: perex, tiwai; +Cc: yongjun_wei, alsa-devel, linux-kernel
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Using list_move_tail() instead of list_del() + list_add_tail().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
sound/pci/emu10k1/memory.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/pci/emu10k1/memory.c b/sound/pci/emu10k1/memory.c
index 0a43662..1dce0a39 100644
--- a/sound/pci/emu10k1/memory.c
+++ b/sound/pci/emu10k1/memory.c
@@ -263,8 +263,8 @@ int snd_emu10k1_memblk_map(struct snd_emu10k1 *emu, struct snd_emu10k1_memblk *b
spin_lock_irqsave(&emu->memblk_lock, flags);
if (blk->mapped_page >= 0) {
/* update order link */
- list_del(&blk->mapped_order_link);
- list_add_tail(&blk->mapped_order_link, &emu->mapped_order_link_head);
+ list_move_tail(&blk->mapped_order_link,
+ &emu->mapped_order_link_head);
spin_unlock_irqrestore(&emu->memblk_lock, flags);
return 0;
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-09-05 7:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-05 6:33 [PATCH] ALSA: use list_move_tail instead of list_del/list_add_tail Wei Yongjun
2012-09-05 7:06 ` Clemens Ladisch
2012-09-05 7:40 ` Takashi Iwai
2012-09-05 7:00 Wei Yongjun
2012-09-05 7:40 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).