linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Mielke <mark@mark.mielke.cc>
To: Lightweight Patch Manager <patch@luckynet.dynu.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Tomas Szepe <szepe@pinerecords.com>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH][2.5] Single linked lists for Linux
Date: Wed, 25 Sep 2002 17:17:16 -0400	[thread overview]
Message-ID: <20020925171716.A15662@mark.mielke.cc> (raw)
In-Reply-To: <20020925205608.1BD86F@hawkeye.luckynet.adm>; from patch@luckynet.dynu.com on Wed, Sep 25, 2002 at 08:56:08PM +0000

On Wed, Sep 25, 2002 at 08:56:08PM +0000, Lightweight Patch Manager wrote:
> +#define slist_add_front(_new, _head)		\
> +do {						\
> +	(_new)->next = (_head);			\
> +	(_head) = (_new);			\
> +} while (0)

I suppose it isn't a serious issue, but is it necessary to repeat
'_new' and '_head' in #define?

> +/**
> + * slist_del -	remove an entry from list
> + * @head:	head to remove it from
> + * @entry:	entry to be removed
> + */
> +#define slist_del(_head, _entry)		\
> +do {						\
> +	(_head)->next = (_entry)->next;		\
> +	(_entry)->next = NULL;			\
> +}

Did you miss "while (0)"?

> +#define slist_del_single(_list)			\
> +	(_list)->next = NULL

Perhaps an outer ()?

mark

-- 
mark@mielke.cc/markm@ncf.ca/markm@nortelnetworks.com __________________________
.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | Neighbourhood Coder
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | 
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada

  One ring to rule them all, one ring to find them, one ring to bring them all
                       and in the darkness bind them...

                           http://mark.mielke.cc/


  parent reply	other threads:[~2002-09-25 21:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-25 20:56 Lightweight Patch Manager
2002-09-25 21:11 ` Rik van Riel
2002-09-25 21:23   ` Thunder from the hill
2002-09-25 21:17 ` Mark Mielke [this message]
     [not found] <83015759@toto.iv>
2002-09-26  0:14 ` Peter Chubb
2002-09-26  0:25   ` Zwane Mwaikambo
2002-09-26  0:35   ` Rik van Riel
2002-09-26  6:42   ` Thunder from the hill

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=20020925171716.A15662@mark.mielke.cc \
    --to=mark@mark.mielke.cc \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=patch@luckynet.dynu.com \
    --cc=szepe@pinerecords.com \
    --subject='Re: [PATCH][2.5] Single linked lists for Linux' \
    /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

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).