From: Andrew Patterson <andrew.patterson@hp.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-pci@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
jbarnes@virtuousgeek.org,
Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Subject: Re: [PATCH 0/1] Recurse when searching for empty slots in resources trees
Date: Wed, 17 Jun 2009 03:19:04 +0000 [thread overview]
Message-ID: <1245208744.19708.243.camel@grinch> (raw)
In-Reply-To: <alpine.LFD.2.01.0906161804030.16802@localhost.localdomain>
On Tue, 2009-06-16 at 18:04 -0700, Linus Torvalds wrote:
>
> On Tue, 16 Jun 2009, Linus Torvalds wrote:
> >
> > Can you try this patch?
>
This looks functionally equivalent to the current code. I get way too
much output to be useful. I can log the serial port if we need it all,
or I can change it to just look at the buses in question if desired.
My hardware got changed around on me, so I will have to try this
tomorrow with the original hardware config.
Andrew
> Oops. As Jesse pointed out, there was no patch.
>
> _This_ time.
>
> Linus
>
> ---
> kernel/resource.c | 13 ++++++++++---
> 1 files changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/resource.c b/kernel/resource.c
> index ac5f3a3..d9d7ede 100644
> --- a/kernel/resource.c
> +++ b/kernel/resource.c
> @@ -140,6 +140,13 @@ __initcall(ioresources_init);
>
> #endif /* CONFIG_PROC_FS */
>
> +#define set_parent(x,p) __set_parent(__FUNCTION__, x, p)
> +static void __set_parent(const char *fn, struct resource *x, struct resource *parent)
> +{
> + WARN("%s: parent of '%s' is '%s'\n", fn, x->name, parent ? parent->name : "none");
> + x->parent = parent;
> +}
> +
> /* Return the conflict entry if you can't request it */
> static struct resource * __request_resource(struct resource *root, struct resource *new)
> {
> @@ -159,7 +166,7 @@ static struct resource * __request_resource(struct resource *root, struct resour
> if (!tmp || tmp->start > end) {
> new->sibling = tmp;
> *p = new;
> - new->parent = root;
> + set_parent(new, root);
> return NULL;
> }
> p = &tmp->sibling;
> @@ -395,13 +402,13 @@ static struct resource * __insert_resource(struct resource *parent, struct resou
> break;
> }
>
> - new->parent = parent;
> + set_parent(new, parent);
> new->sibling = next->sibling;
> new->child = first;
>
> next->sibling = NULL;
> for (next = first; next; next = next->sibling)
> - next->parent = new;
> + set_parent(next, new);
>
> if (parent->child == first) {
> parent->child = new;
>
--
Andrew Patterson
Hewlett-Packard
next prev parent reply other threads:[~2009-06-17 3:19 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-16 22:04 [PATCH 0/1] Recurse when searching for empty slots in resources trees Andrew Patterson
2009-06-16 22:04 ` [PATCH] " Andrew Patterson
2009-06-16 22:19 ` [PATCH 0/1] " Linus Torvalds
2009-06-16 22:51 ` Andrew Patterson
2009-06-16 23:05 ` Linus Torvalds
2009-06-16 23:32 ` Linus Torvalds
2009-06-17 14:45 ` Ivan Kokshaysky
2009-06-17 16:28 ` Linus Torvalds
2009-06-16 23:38 ` Andrew Patterson
2009-06-16 23:56 ` Linus Torvalds
2009-06-17 0:19 ` Linus Torvalds
2009-06-17 1:04 ` Linus Torvalds
2009-06-17 3:19 ` Andrew Patterson [this message]
2009-06-17 4:19 ` Linus Torvalds
2009-06-17 0:28 ` Jesse Barnes
2009-06-17 16:03 ` Alex Chiang
2009-06-17 9:13 ` Kenji Kaneshige
2009-06-17 13:43 ` Matthew Wilcox
2009-06-17 16:23 ` Linus Torvalds
2009-06-17 17:42 ` Andrew Patterson
2009-06-17 18:12 ` Linus Torvalds
2009-06-17 20:08 ` Andrew Patterson
2009-06-17 20:12 ` Linus Torvalds
2009-06-17 20:17 ` Matthew Wilcox
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=1245208744.19708.243.camel@grinch \
--to=andrew.patterson@hp.com \
--cc=ink@jurassic.park.msu.ru \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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