From: Adam Belay <ambx1@neo.rr.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] PnP Updates for 2.6.4-mm2
Date: Mon, 15 Mar 2004 00:06:16 +0000 [thread overview]
Message-ID: <20040315000615.GA5972@neo.rr.com> (raw)
Hi Andrew,
This is the first of a series of PnP updates for 2.6.4. I would appreciate if
these could be tested in your -mm tree.
Thanks,
Adam
[PNP] Resource Conflict Cleanup
This patch cleans up the resource conflict logic and was originally from Matthew
Wilcox <willy@debian.org>.
--- a/drivers/pnp/resource.c 2004-01-23 15:19:25.000000000 +0000
+++ b/drivers/pnp/resource.c 2004-02-01 20:07:41.000000000 +0000
@@ -231,15 +231,9 @@
#define length(start, end) (*(end) - *(start) + 1)
-/* ranged_conflict - used to determine if two resource ranges conflict
- * condition 1: check if the start of a is within b
- * condition 2: check if the end of a is within b
- * condition 3: check if b is engulfed by a */
-
+/* Two ranges conflict if one doesn't end before the other starts */
#define ranged_conflict(starta, enda, startb, endb) \
-((*(starta) >= *(startb) && *(starta) <= *(endb)) || \
- (*(enda) >= *(startb) && *(enda) <= *(endb)) || \
- (*(starta) < *(startb) && *(enda) > *(endb)))
+ !((*(enda) < *(startb)) || (*(endb) < *(starta)))
#define cannot_compare(flags) \
((flags) & (IORESOURCE_UNSET | IORESOURCE_DISABLED))
next reply other threads:[~2004-03-15 5:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-15 0:06 Adam Belay [this message]
2004-03-15 0:10 ` [PATCH] PnP Updates for 2.6.4-mm2 Adam Belay
2004-03-15 0:15 ` Adam Belay
2004-03-15 0:21 ` Adam Belay
2004-03-15 0:23 ` Adam Belay
2004-03-15 0:26 ` Adam Belay
2004-03-15 0:27 ` Adam Belay
2004-03-15 0:33 ` Adam Belay
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=20040315000615.GA5972@neo.rr.com \
--to=ambx1@neo.rr.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).