Page MenuHomeFreeBSD

D32785.id97824.diff
No OneTemporary

D32785.id97824.diff

Index: sys/dev/acpica/acpi.c
===================================================================
--- sys/dev/acpica/acpi.c
+++ sys/dev/acpica/acpi.c
@@ -1119,7 +1119,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
@@ -1141,7 +1142,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
@@ -1156,33 +1157,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

Mime Type
text/plain
Expires
Thu, Jun 11, 2:29 AM (11 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33864675
Default Alt Text
D32785.id97824.diff (1 KB)

Event Timeline