All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel <alsa-devel@lists.sourceforge.net>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Chuck Ebbert <76306.1226@compuserve.com>
Subject: Re: list corruption on removal of snd_seq_dummy
Date: Tue, 27 Jun 2006 12:58:19 -0400	[thread overview]
Message-ID: <20060627165819.GC1280@redhat.com> (raw)
In-Reply-To: <s5h8xniwz74.wl%tiwai@suse.de>

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.

		Dave

-- 
http://www.codemonkey.org.uk

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

WARNING: multiple messages have this Message-ID (diff)
From: Dave Jones <davej@redhat.com>
To: Takashi Iwai <tiwai@suse.de>
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 12:58:19 -0400	[thread overview]
Message-ID: <20060627165819.GC1280@redhat.com> (raw)
In-Reply-To: <s5h8xniwz74.wl%tiwai@suse.de>

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.

		Dave

-- 
http://www.codemonkey.org.uk

  reply	other threads:[~2006-06-27 16:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-27 12:05 list corruption on removal of snd_seq_dummy Chuck Ebbert
2006-06-27 12:38 ` Takashi Iwai
2006-06-27 12:38   ` Takashi Iwai
2006-06-27 16:58   ` Dave Jones [this message]
2006-06-27 16:58     ` Dave Jones
2006-06-27 17:07     ` Takashi Iwai
2006-06-27 17:07       ` Takashi Iwai
  -- 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  3:27     ` Dave Jones
2006-06-27  9:28     ` Takashi Iwai
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=20060627165819.GC1280@redhat.com \
    --to=davej@redhat.com \
    --cc=76306.1226@compuserve.com \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.