From: viro@parcelfarce.linux.theplanet.co.uk
To: olof@austin.ibm.com
Cc: Marcelo Tosatti <marcelo@conectiva.com.br>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [2.4] Re: /proc/ioports overrun patch
Date: Wed, 24 Sep 2003 20:59:26 +0100 [thread overview]
Message-ID: <20030924195926.GZ7665@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20030924195133.GY7665@parcelfarce.linux.theplanet.co.uk>
On Wed, Sep 24, 2003 at 08:51:33PM +0100, viro@parcelfarce.linux.theplanet.co.uk wrote:
> Hmm... Why not make the iterator traverse the resource tree instead?
> After all, all it takes is addition of pointer to parent resource into
> struct resource. Goes for both 2.4 and 2.6...
Hey - it's already there. That makes life very easy - ->next() should
do the following:
if (resource->child)
return resource->child;
while (!resource->sibling) {
resource = resource->parent;
if (!resource)
return NULL;
}
return resource->sibling;
AFAICS that should be it - walks the tree in right order. Depth can be
trivially found by ->show(), so there's no problems either...
next prev parent reply other threads:[~2003-09-24 19:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-29 13:30 /proc/ioports overrun patch Marcelo Tosatti
2003-08-29 18:59 ` john stultz
2003-09-24 19:42 ` [PATCH] [2.4] " olof
2003-09-24 19:51 ` viro
2003-09-24 19:59 ` viro [this message]
2003-09-24 21:47 ` viro
2003-09-24 22:36 ` viro
2003-09-24 22:54 ` Linus Torvalds
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=20030924195926.GZ7665@parcelfarce.linux.theplanet.co.uk \
--to=viro@parcelfarce.linux.theplanet.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=olof@austin.ibm.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 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).