From: "J.A. Magallon" <jamagallon@able.es>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Subject: Re: [TRIVIAL PATCH] Remove list_t infection.
Date: Wed, 4 Sep 2002 16:36:15 +0200 [thread overview]
Message-ID: <20020904143615.GC1949@werewolf.able.es> (raw)
In-Reply-To: <20020904024428.727A02C19C@lists.samba.org>; from rusty@rustcorp.com.au on Wed, Sep 04, 2002 at 04:44:42 +0200
On 2002.09.04 Rusty Russell wrote:
>In message <Pine.LNX.4.44.0209031923290.1513-100000@home.transmeta.com> you wri
>te:
...
>
>I'm confused, but I do know three things:
>
>1) list_t *bad*,
>
>2) Grand renaming of "struct list_head" *bad*, and
>
Why not something like:
struct list_node {
struct list_node *prev;
struct list_node *next;
}
struct list {
struct list_node *prev;
struct list_node *next;
}
list_length(struct list *l)
list_add(struct list_node *new, struct list *head)
list_splice(struct list *list, struct list *head)
New:
#define list_sublist_from(node) ((struct list *)node)
So people would be forced to think if he is using a 'list_head'
as a node or as a sublist, and do the right casts to shut up the
compiler (that's why you can't do a typedef list_node list..., for
the compiler to scream...)
--
J.A. Magallon <jamagallon@able.es> \ Software is like sex:
werewolf.able.es \ It's better when it's free
Mandrake Linux release 9.0 (Cooker) for i586
Linux 2.4.20-pre5-j0 (gcc 3.2 (Mandrake Linux 9.0 3.2-1mdk))
next prev parent reply other threads:[~2002-09-04 14:32 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-02 5:23 [TRIVIAL PATCH] Remove list_t infection Rusty Russell
2002-09-02 5:51 ` Robert Love
2002-09-02 6:02 ` William Lee Irwin III
2002-09-02 6:20 ` David S. Miller
2002-09-02 10:11 ` Daniel Phillips
2002-09-02 10:05 ` David S. Miller
2002-09-02 10:16 ` Daniel Phillips
2002-09-02 10:11 ` David S. Miller
2002-09-02 10:25 ` Daniel Phillips
2002-09-02 10:21 ` David S. Miller
2002-09-02 10:24 ` William Lee Irwin III
2002-09-03 22:13 ` Jamie Lokier
2002-09-03 23:14 ` Linus Torvalds
2002-09-04 0:41 ` Rusty Russell
2002-09-04 1:52 ` Daniel Phillips
2002-09-04 2:26 ` Linus Torvalds
2002-09-04 2:44 ` Rusty Russell
2002-09-04 14:36 ` J.A. Magallon [this message]
2002-09-04 6:11 ` Thunder from the hill
2002-09-02 6:23 ` Neil Brown
2002-09-01 20:45 ` Nick Piggin
2002-09-02 6:27 ` William Lee Irwin III
2002-09-02 10:07 ` Daniel Phillips
2002-09-02 10:05 ` Daniel Phillips
2002-09-02 6:17 ` Rusty Russell
2002-09-06 9:28 ` Dan Aloni
2002-09-06 14:35 ` Robert Love
2002-09-09 5:57 ` Rusty Russell
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=20020904143615.GC1949@werewolf.able.es \
--to=jamagallon@able.es \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=torvalds@transmeta.com \
/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.