[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200806051032.24531.bjorn.helgaas@hp.com>
Date: Thu, 5 Jun 2008 10:32:23 -0600
From: Bjorn Helgaas <bjorn.helgaas@...com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Alejandro Riveira Fernández
<ariveira@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: Linux 2.6.26-rc5
On Thursday 05 June 2008 10:19:01 am Linus Torvalds wrote:
>
> On Thu, 5 Jun 2008, Bjorn Helgaas wrote:
> >
> > for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) {
> > - if (res->flags & IORESOURCE_DISABLED)
> > + if (res->flags & IORESOURCE_UNSET ||
> > + res->flags & IORESOURCE_DISABLED)
> > continue;
>
> Umm. If I was a compiler, I'd be warning about this. You don't get a
> warning about suggesting parentheses around the '&'?
Geez, I dreamed about this very question last night, but forgot to
take care this morning.
Actually, I didn't get a warning (gcc 4.1.3), but your way is better.
Here's the updated patch if you haven't fixed it already:
PNP: skip UNSET MEM resources as well as DISABLED ones
We don't need to reserve "unset" resources. Trying to reserve
them results in messages like this, which are ugly but harmless:
system 00:08: iomem range 0x0-0x0 could not be reserved
Future PNP patches will remove use of IORESOURCE_UNSET, but
we still need it for now.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@...com>
Index: work11/drivers/pnp/system.c
===================================================================
--- work11.orig/drivers/pnp/system.c 2008-06-05 09:46:33.000000000 -0600
+++ work11/drivers/pnp/system.c 2008-06-05 10:29:10.000000000 -0600
@@ -81,7 +81,7 @@ static void reserve_resources_of_dev(str
}
for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) {
- if (res->flags & IORESOURCE_DISABLED)
+ if (res->flags & (IORESOURCE_UNSET | IORESOURCE_DISABLED))
continue;
reserve_range(dev, res->start, res->end, 0);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists