Re: [PATCH] Simplify yenta code

From: Matthew Wilcox
Date: Mon Oct 01 2007 - 14:57:11 EST


On Mon, Oct 01, 2007 at 01:41:15PM -0500, Linas Vepstas wrote:
> - if (type & IORESOURCE_IO) {
> - if ((yenta_search_res(socket, res, BRIDGE_IO_MAX)) ||
> - (yenta_search_res(socket, res, BRIDGE_IO_ACC)) ||
> - (yenta_search_res(socket, res, BRIDGE_IO_MIN)))
> - return 1;
> - } else {
> - if (type & IORESOURCE_PREFETCH) {
> - if ((yenta_search_res(socket, res, BRIDGE_MEM_MAX)) ||
> - (yenta_search_res(socket, res, BRIDGE_MEM_ACC)) ||
> - (yenta_search_res(socket, res, BRIDGE_MEM_MIN)))
> - return 1;
> - /* Approximating prefetchable by non-prefetchable */
> - res->flags = IORESOURCE_MEM;
> - }
> + if ((yenta_search_res(socket, res, BRIDGE_MEM_MAX)) ||
> + (yenta_search_res(socket, res, BRIDGE_MEM_ACC)) ||
> + (yenta_search_res(socket, res, BRIDGE_MEM_MIN)))

Are BRIDGE_IO_MAX and BRIDGE_MEM_MAX guaranteed to be the same?

--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/