From: Takashi Iwai <tiwai@suse.de>
To: Dave Jones <davej@redhat.com>
Cc: Chuck Ebbert <76306.1226@compuserve.com>,
alsa-devel <alsa-devel@lists.sourceforge.net>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: list corruption on removal of snd_seq_dummy
Date: Tue, 27 Jun 2006 19:07:26 +0200 [thread overview]
Message-ID: <s5h8xnittm9.wl%tiwai@suse.de> (raw)
In-Reply-To: <20060627165819.GC1280@redhat.com>
At Tue, 27 Jun 2006 12:58:19 -0400,
Dave Jones wrote:
>
> On Tue, Jun 27, 2006 at 02:38:39PM +0200, Takashi Iwai wrote:
> > > > No, list_move() can't move the whole elements without loop.
> > > >
> > > > A solution is
> > > >
> > > > list_add(B, A);
> > > > list_del_init(A);
> > > >
> > > > (although this introduces a bit more code :)
> > >
> > > Shouldn't it be like this?
> > >
> > > ports_list_first = client->ports_list_head.next;
> > > list_del_init(client->ports_list_head);
> > > list_splice(ports_list_first, &deleted_list);
> >
> > This requires INIT_LIST_HEAD(&deleted_list) first, so obviously
> > a longer code :)
>
> This is hardly a speed/size critical function. I'd go for readability
> over cute hacks any day.
Yeah, of course.
The code was already fixed on ALSA tree to use standard macros.
Takashi
next prev parent reply other threads:[~2006-06-27 17:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-27 12:05 Chuck Ebbert
2006-06-27 12:38 ` Takashi Iwai
2006-06-27 16:58 ` Dave Jones
2006-06-27 17:07 ` Takashi Iwai [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-06-23 3:15 Dave Jones
2006-06-23 10:47 ` Takashi Iwai
2006-06-27 3:27 ` Dave Jones
2006-06-27 9:28 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5h8xnittm9.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=76306.1226@compuserve.com \
--cc=alsa-devel@lists.sourceforge.net \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®