From: Dave Jones <davej@codemonkey.org.uk>
To: Zach Brown <zab@zabbo.net>
Cc: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 2.5.39 list_head debugging
Date: Sun, 29 Sep 2002 18:22:47 +0100 [thread overview]
Message-ID: <20020929172247.GA23543@suse.de> (raw)
In-Reply-To: <20020929015852.K13817@bitchcake.off.net>
On Sun, Sep 29, 2002 at 01:58:52AM -0400, Zach Brown wrote:
> +static inline struct list_head * __list_valid(struct list_head *list)
> +{
> + BUG_ON(list == NULL);
> + BUG_ON(list->next == NULL);
> + BUG_ON(list->prev == NULL);
> + BUG_ON(list->next->prev != list);
> + BUG_ON(list->prev->next != list);
> + BUG_ON((list->next == list) && (list->prev != list));
> + BUG_ON((list->prev == list) && (list->next != list));
> +
> + return list;
> +}
> +#else
> +
> +#define __list_valid(args...)
> +
> +#endif
Two points (both related to return type).
1, why is it needed ? none of the macros seems to check it.
2, will this work for the #define __list_valid(args...) case ?
Dave
--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs
next prev parent reply other threads:[~2002-09-29 17:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-29 5:58 [PATCH] 2.5.39 list_head debugging Zach Brown
2002-09-29 6:12 ` Andrew Morton
2002-09-29 6:24 ` Zach Brown
2002-09-29 8:33 ` Ingo Molnar
2002-09-29 14:27 ` Zach Brown
2002-09-29 14:28 ` Martin J. Bligh
2002-09-29 14:30 ` Zach Brown
2002-09-29 17:22 ` Dave Jones [this message]
2002-09-29 20:22 ` Zach Brown
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=20020929172247.GA23543@suse.de \
--to=davej@codemonkey.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=zab@zabbo.net \
/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.