Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
bba77b4a
Commit
bba77b4a
authored
Mar 20, 2004
by
Matthew Wilcox
Committed by
Adam Belay
Mar 20, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PNP] Resource Conflict Cleanup
This patch simplifies the ranged resource checking logic.
parent
72a3b209
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
drivers/pnp/resource.c
drivers/pnp/resource.c
+2
-8
No files found.
drivers/pnp/resource.c
View file @
bba77b4a
...
@@ -231,15 +231,9 @@ void pnp_free_option(struct pnp_option *option)
...
@@ -231,15 +231,9 @@ void pnp_free_option(struct pnp_option *option)
#define length(start, end) (*(end) - *(start) + 1)
#define length(start, end) (*(end) - *(start) + 1)
/* ranged_conflict - used to determine if two resource ranges conflict
/* Two ranges conflict if one doesn't end before the other starts */
* 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 */
#define ranged_conflict(starta, enda, startb, endb) \
#define ranged_conflict(starta, enda, startb, endb) \
((*(starta) >= *(startb) && *(starta) <= *(endb)) || \
!((*(enda) < *(startb)) || (*(endb) < *(starta)))
(*(enda) >= *(startb) && *(enda) <= *(endb)) || \
(*(starta) < *(startb) && *(enda) > *(endb)))
#define cannot_compare(flags) \
#define cannot_compare(flags) \
((flags) & (IORESOURCE_UNSET | IORESOURCE_DISABLED))
((flags) & (IORESOURCE_UNSET | IORESOURCE_DISABLED))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment