Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103012786
D32785.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D32785.diff
View Options
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -1133,7 +1133,8 @@
{
const char *s;
long value;
- int line, matches, unit;
+ int line, unit;
+ bool matches;
/*
* Iterate over all the hints for the devices with the specified
@@ -1155,7 +1156,7 @@
* XXX: We may want to revisit this to be more lenient and wire
* as long as it gets one match.
*/
- matches = 0;
+ matches = false;
if (resource_long_value(name, unit, "port", &value) == 0) {
/*
* Floppy drive controllers are notorious for having a
@@ -1170,33 +1171,33 @@
if (strcmp(name, "fdc") == 0)
value += 2;
if (acpi_match_resource_hint(child, SYS_RES_IOPORT, value))
- matches++;
+ matches = true;
else
continue;
}
if (resource_long_value(name, unit, "maddr", &value) == 0) {
if (acpi_match_resource_hint(child, SYS_RES_MEMORY, value))
- matches++;
+ matches = true;
else
continue;
}
- if (matches > 0)
+ if (matches)
goto matched;
if (resource_long_value(name, unit, "irq", &value) == 0) {
if (acpi_match_resource_hint(child, SYS_RES_IRQ, value))
- matches++;
+ matches = true;
else
continue;
}
if (resource_long_value(name, unit, "drq", &value) == 0) {
if (acpi_match_resource_hint(child, SYS_RES_DRQ, value))
- matches++;
+ matches = true;
else
continue;
}
matched:
- if (matches > 0) {
+ if (matches) {
/* We have a winner! */
*unitp = unit;
break;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 20, 7:59 PM (3 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14746084
Default Alt Text
D32785.diff (1 KB)
Attached To
Mode
D32785: acpi_hint_device_unit: matches is a bool, make it one
Attached
Detach File
Event Timeline
Log In to Comment