summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/components/resources/rscalc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/components/resources/rscalc.c')
-rw-r--r--sys/contrib/dev/acpica/components/resources/rscalc.c65
1 files changed, 36 insertions, 29 deletions
diff --git a/sys/contrib/dev/acpica/components/resources/rscalc.c b/sys/contrib/dev/acpica/components/resources/rscalc.c
index 38db8c1..9cc9638 100644
--- a/sys/contrib/dev/acpica/components/resources/rscalc.c
+++ b/sys/contrib/dev/acpica/components/resources/rscalc.c
@@ -5,7 +5,7 @@
******************************************************************************/
/*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -164,16 +164,17 @@ AcpiRsStreamOptionLength (
/*
- * The ResourceSourceIndex and ResourceSource are optional elements of some
- * Large-type resource descriptors.
+ * The ResourceSourceIndex and ResourceSource are optional elements of
+ * some Large-type resource descriptors.
*/
/*
- * If the length of the actual resource descriptor is greater than the ACPI
- * spec-defined minimum length, it means that a ResourceSourceIndex exists
- * and is followed by a (required) null terminated string. The string length
- * (including the null terminator) is the resource length minus the minimum
- * length, minus one byte for the ResourceSourceIndex itself.
+ * If the length of the actual resource descriptor is greater than the
+ * ACPI spec-defined minimum length, it means that a ResourceSourceIndex
+ * exists and is followed by a (required) null terminated string. The
+ * string length (including the null terminator) is the resource length
+ * minus the minimum length, minus one byte for the ResourceSourceIndex
+ * itself.
*/
if (ResourceLength > MinimumAmlResourceLength)
{
@@ -309,9 +310,9 @@ AcpiRsGetAmlLength (
* 16-Bit Address Resource:
* Add the size of the optional ResourceSource info
*/
- TotalSize = (ACPI_RS_LENGTH)
- (TotalSize + AcpiRsStructOptionLength (
- &Resource->Data.Address16.ResourceSource));
+ TotalSize = (ACPI_RS_LENGTH) (TotalSize +
+ AcpiRsStructOptionLength (
+ &Resource->Data.Address16.ResourceSource));
break;
@@ -320,9 +321,9 @@ AcpiRsGetAmlLength (
* 32-Bit Address Resource:
* Add the size of the optional ResourceSource info
*/
- TotalSize = (ACPI_RS_LENGTH)
- (TotalSize + AcpiRsStructOptionLength (
- &Resource->Data.Address32.ResourceSource));
+ TotalSize = (ACPI_RS_LENGTH) (TotalSize +
+ AcpiRsStructOptionLength (
+ &Resource->Data.Address32.ResourceSource));
break;
@@ -331,9 +332,9 @@ AcpiRsGetAmlLength (
* 64-Bit Address Resource:
* Add the size of the optional ResourceSource info
*/
- TotalSize = (ACPI_RS_LENGTH)
- (TotalSize + AcpiRsStructOptionLength (
- &Resource->Data.Address64.ResourceSource));
+ TotalSize = (ACPI_RS_LENGTH) (TotalSize +
+ AcpiRsStructOptionLength (
+ &Resource->Data.Address64.ResourceSource));
break;
@@ -343,8 +344,7 @@ AcpiRsGetAmlLength (
* Add the size of each additional optional interrupt beyond the
* required 1 (4 bytes for each UINT32 interrupt number)
*/
- TotalSize = (ACPI_RS_LENGTH)
- (TotalSize +
+ TotalSize = (ACPI_RS_LENGTH) (TotalSize +
((Resource->Data.ExtendedIrq.InterruptCount - 1) * 4) +
/* Add the size of the optional ResourceSource info */
@@ -356,7 +356,8 @@ AcpiRsGetAmlLength (
case ACPI_RESOURCE_TYPE_GPIO:
- TotalSize = (ACPI_RS_LENGTH) (TotalSize + (Resource->Data.Gpio.PinTableLength * 2) +
+ TotalSize = (ACPI_RS_LENGTH) (TotalSize +
+ (Resource->Data.Gpio.PinTableLength * 2) +
Resource->Data.Gpio.ResourceSource.StringLength +
Resource->Data.Gpio.VendorLength);
@@ -365,7 +366,8 @@ AcpiRsGetAmlLength (
case ACPI_RESOURCE_TYPE_SERIAL_BUS:
- TotalSize = AcpiGbl_AmlResourceSerialBusSizes [Resource->Data.CommonSerialBus.Type];
+ TotalSize = AcpiGbl_AmlResourceSerialBusSizes [
+ Resource->Data.CommonSerialBus.Type];
TotalSize = (ACPI_RS_LENGTH) (TotalSize +
Resource->Data.I2cSerialBus.ResourceSource.StringLength +
@@ -544,12 +546,15 @@ AcpiRsGetListLength (
if (AmlResource->Gpio.VendorLength)
{
- ExtraStructBytes += AmlResource->Gpio.VendorOffset -
- AmlResource->Gpio.PinTableOffset + AmlResource->Gpio.VendorLength;
+ ExtraStructBytes +=
+ AmlResource->Gpio.VendorOffset -
+ AmlResource->Gpio.PinTableOffset +
+ AmlResource->Gpio.VendorLength;
}
else
{
- ExtraStructBytes += AmlResource->LargeHeader.ResourceLength +
+ ExtraStructBytes +=
+ AmlResource->LargeHeader.ResourceLength +
sizeof (AML_RESOURCE_LARGE_HEADER) -
AmlResource->Gpio.PinTableOffset;
}
@@ -559,7 +564,8 @@ AcpiRsGetListLength (
MinimumAmlResourceLength = AcpiGbl_ResourceAmlSerialBusSizes[
AmlResource->CommonSerialBus.Type];
- ExtraStructBytes += AmlResource->CommonSerialBus.ResourceLength -
+ ExtraStructBytes +=
+ AmlResource->CommonSerialBus.ResourceLength -
MinimumAmlResourceLength;
break;
@@ -574,7 +580,8 @@ AcpiRsGetListLength (
* Important: Round the size up for the appropriate alignment. This
* is a requirement on IA64.
*/
- if (AcpiUtGetResourceType (AmlBuffer) == ACPI_RESOURCE_NAME_SERIAL_BUS)
+ if (AcpiUtGetResourceType (AmlBuffer) ==
+ ACPI_RESOURCE_NAME_SERIAL_BUS)
{
BufferSize = AcpiGbl_ResourceStructSerialBusSizes[
AmlResource->CommonSerialBus.Type] + ExtraStructBytes;
@@ -582,10 +589,10 @@ AcpiRsGetListLength (
else
{
BufferSize = AcpiGbl_ResourceStructSizes[ResourceIndex] +
- ExtraStructBytes;
+ ExtraStructBytes;
}
- BufferSize = (UINT32) ACPI_ROUND_UP_TO_NATIVE_WORD (BufferSize);
+ BufferSize = (UINT32) ACPI_ROUND_UP_TO_NATIVE_WORD (BufferSize);
*SizeNeeded += BufferSize;
ACPI_DEBUG_PRINT ((ACPI_DB_RESOURCES,
@@ -722,7 +729,7 @@ AcpiRsGetPciRoutingTableLength (
else
{
TempSizeNeeded += AcpiNsGetPathnameLength (
- (*SubObjectList)->Reference.Node);
+ (*SubObjectList)->Reference.Node);
}
}
else
OpenPOWER on IntegriCloud