linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PnP Updates for 2.6.4-mm2
@ 2004-03-15  0:06 Adam Belay
  2004-03-15  0:10 ` Adam Belay
  0 siblings, 1 reply; 8+ messages in thread
From: Adam Belay @ 2004-03-15  0:06 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

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))

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-03-15  5:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-15  0:06 [PATCH] PnP Updates for 2.6.4-mm2 Adam Belay
2004-03-15  0:10 ` 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

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).