diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2005-11-04 21:29:41 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2005-11-04 21:29:41 +0000 |
| commit | 45e7d2e7450e44986f03c0179902f0df01bd1528 (patch) | |
| tree | f62fa89cd760d56c7540e7e041c0d5594a4a9a86 /sys/contrib | |
| parent | 160ebe8754a867ab13bb20f3366d377ee22b98f1 (diff) | |
| parent | e9bfb92a8e683016c7f6c24104fce9db9567ee1c (diff) | |
Notes
Diffstat (limited to 'sys/contrib')
| -rw-r--r-- | sys/contrib/dev/acpica/rscalc.c | 9 | ||||
| -rw-r--r-- | sys/contrib/dev/acpica/rsmisc.c | 4 |
2 files changed, 5 insertions, 8 deletions
diff --git a/sys/contrib/dev/acpica/rscalc.c b/sys/contrib/dev/acpica/rscalc.c index e8187d6973b86..6420f9f26600a 100644 --- a/sys/contrib/dev/acpica/rscalc.c +++ b/sys/contrib/dev/acpica/rscalc.c @@ -487,8 +487,7 @@ AcpiRsGetListLength ( * Get the number of bits set in the IRQ word */ ACPI_MOVE_16_TO_16 (&Temp16, Buffer); - ExtraStructBytes = (AcpiRsCountSetBits (Temp16) * - sizeof (UINT32)); + ExtraStructBytes = AcpiRsCountSetBits (Temp16); break; @@ -497,9 +496,7 @@ AcpiRsGetListLength ( * DMA Resource: * Get the number of bits set in the DMA channels byte */ - ACPI_MOVE_16_TO_16 (&Temp16, Buffer); - ExtraStructBytes = (AcpiRsCountSetBits (Temp16) * - sizeof (UINT32)); + ExtraStructBytes = AcpiRsCountSetBits (*Buffer); break; @@ -596,7 +593,7 @@ AcpiRsGetListLength ( /* Update the required buffer size for the internal descriptor structs */ Temp16 = (UINT16) (ResourceInfo->MinimumInternalStructLength + ExtraStructBytes); - BufferSize += (UINT32) ACPI_ALIGN_RESOURCE_SIZE (Temp16); + BufferSize += (UINT32) ACPI_ROUND_UP_TO_NATIVE_WORD (Temp16); /* * Update byte count and point to the next resource within the stream diff --git a/sys/contrib/dev/acpica/rsmisc.c b/sys/contrib/dev/acpica/rsmisc.c index ae5a4ec7f6980..bc28464e10ab4 100644 --- a/sys/contrib/dev/acpica/rsmisc.c +++ b/sys/contrib/dev/acpica/rsmisc.c @@ -329,7 +329,7 @@ AcpiRsConvertAmlToResource ( ItemCount = AcpiRsDecodeBitmask (*((UINT8 *) Source), Destination); if (ItemCount) { - Resource->Length += Resource->Length + (ItemCount - 1); + Resource->Length += (ItemCount - 1); } Target = ((char *) Resource) + Info->Value; @@ -346,7 +346,7 @@ AcpiRsConvertAmlToResource ( ItemCount = AcpiRsDecodeBitmask (Temp16, Destination); if (ItemCount) { - Resource->Length = Resource->Length + (ItemCount - 1); + Resource->Length += (ItemCount - 1); } Target = ((char *) Resource) + Info->Value; |
