summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/components/resources/rscreate.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/components/resources/rscreate.c')
-rw-r--r--sys/contrib/dev/acpica/components/resources/rscreate.c54
1 files changed, 28 insertions, 26 deletions
diff --git a/sys/contrib/dev/acpica/components/resources/rscreate.c b/sys/contrib/dev/acpica/components/resources/rscreate.c
index c646129..c9b4b12 100644
--- a/sys/contrib/dev/acpica/components/resources/rscreate.c
+++ b/sys/contrib/dev/acpica/components/resources/rscreate.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
@@ -86,8 +86,8 @@ AcpiBufferToResource (
/* Get the required length for the converted resource */
- Status = AcpiRsGetListLength (AmlBuffer, AmlBufferLength,
- &ListSizeNeeded);
+ Status = AcpiRsGetListLength (
+ AmlBuffer, AmlBufferLength, &ListSizeNeeded);
if (Status == AE_AML_NO_RESOURCE_END_TAG)
{
Status = AE_OK;
@@ -109,7 +109,7 @@ AcpiBufferToResource (
/* Perform the AML-to-Resource conversion */
Status = AcpiUtWalkAmlResources (NULL, AmlBuffer, AmlBufferLength,
- AcpiRsConvertAmlToResources, &CurrentResourcePtr);
+ AcpiRsConvertAmlToResources, &CurrentResourcePtr);
if (Status == AE_AML_NO_RESOURCE_END_TAG)
{
Status = AE_OK;
@@ -197,14 +197,14 @@ AcpiRsCreateResourceList (
Resource = OutputBuffer->Pointer;
Status = AcpiUtWalkAmlResources (NULL, AmlStart, AmlBufferLength,
- AcpiRsConvertAmlToResources, &Resource);
+ AcpiRsConvertAmlToResources, &Resource);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "OutputBuffer %p Length %X\n",
- OutputBuffer->Pointer, (UINT32) OutputBuffer->Length));
+ OutputBuffer->Pointer, (UINT32) OutputBuffer->Length));
return_ACPI_STATUS (AE_OK);
}
@@ -255,8 +255,8 @@ AcpiRsCreatePciRoutingTable (
/* Get the required buffer length */
- Status = AcpiRsGetPciRoutingTableLength (PackageObject,
- &BufferSizeNeeded);
+ Status = AcpiRsGetPciRoutingTableLength (
+ PackageObject,&BufferSizeNeeded);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -278,10 +278,10 @@ AcpiRsCreatePciRoutingTable (
* package that in turn contains an UINT64 Address, a UINT8 Pin,
* a Name, and a UINT8 SourceIndex.
*/
- TopObjectList = PackageObject->Package.Elements;
+ TopObjectList = PackageObject->Package.Elements;
NumberOfElements = PackageObject->Package.Count;
- Buffer = OutputBuffer->Pointer;
- UserPrt = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, Buffer);
+ Buffer = OutputBuffer->Pointer;
+ UserPrt = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, Buffer);
for (Index = 0; Index < NumberOfElements; Index++)
{
@@ -295,9 +295,9 @@ AcpiRsCreatePciRoutingTable (
UserPrt = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, Buffer);
/*
- * Fill in the Length field with the information we have at this point.
- * The minus four is to subtract the size of the UINT8 Source[4] member
- * because it is added below.
+ * Fill in the Length field with the information we have at this
+ * point. The minus four is to subtract the size of the UINT8
+ * Source[4] member because it is added below.
*/
UserPrt->Length = (sizeof (ACPI_PCI_ROUTING_TABLE) - 4);
@@ -323,7 +323,8 @@ AcpiRsCreatePciRoutingTable (
ObjDesc = SubObjectList[0];
if (!ObjDesc || ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
{
- ACPI_ERROR ((AE_INFO, "(PRT[%u].Address) Need Integer, found %s",
+ ACPI_ERROR ((AE_INFO,
+ "(PRT[%u].Address) Need Integer, found %s",
Index, AcpiUtGetObjectTypeName (ObjDesc)));
return_ACPI_STATUS (AE_BAD_DATA);
}
@@ -366,20 +367,21 @@ AcpiRsCreatePciRoutingTable (
/* Use *remaining* length of the buffer as max for pathname */
PathBuffer.Length = OutputBuffer->Length -
- (UINT32) ((UINT8 *) UserPrt->Source -
- (UINT8 *) OutputBuffer->Pointer);
+ (UINT32) ((UINT8 *) UserPrt->Source -
+ (UINT8 *) OutputBuffer->Pointer);
PathBuffer.Pointer = UserPrt->Source;
- Status = AcpiNsHandleToPathname ((ACPI_HANDLE) Node, &PathBuffer);
+ Status = AcpiNsHandleToPathname (
+ (ACPI_HANDLE) Node, &PathBuffer, FALSE);
/* +1 to include null terminator */
- UserPrt->Length += (UINT32) ACPI_STRLEN (UserPrt->Source) + 1;
+ UserPrt->Length += (UINT32) strlen (UserPrt->Source) + 1;
break;
case ACPI_TYPE_STRING:
- ACPI_STRCPY (UserPrt->Source, ObjDesc->String.Pointer);
+ strcpy (UserPrt->Source, ObjDesc->String.Pointer);
/*
* Add to the Length field the length of the string
@@ -390,8 +392,8 @@ AcpiRsCreatePciRoutingTable (
case ACPI_TYPE_INTEGER:
/*
- * If this is a number, then the Source Name is NULL, since the
- * entire buffer was zeroed out, we can leave this alone.
+ * If this is a number, then the Source Name is NULL, since
+ * the entire buffer was zeroed out, we can leave this alone.
*
* Add to the Length field the length of the UINT32 NULL
*/
@@ -430,7 +432,7 @@ AcpiRsCreatePciRoutingTable (
}
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "OutputBuffer %p Length %X\n",
- OutputBuffer->Pointer, (UINT32) OutputBuffer->Length));
+ OutputBuffer->Pointer, (UINT32) OutputBuffer->Length));
return_ACPI_STATUS (AE_OK);
}
@@ -471,8 +473,8 @@ AcpiRsCreateAmlResources (
/* Get the buffer size needed for the AML byte stream */
- Status = AcpiRsGetAmlLength (ResourceList->Pointer,
- ResourceList->Length, &AmlSizeNeeded);
+ Status = AcpiRsGetAmlLength (
+ ResourceList->Pointer, ResourceList->Length, &AmlSizeNeeded);
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "AmlSizeNeeded=%X, %s\n",
(UINT32) AmlSizeNeeded, AcpiFormatException (Status)));
@@ -492,7 +494,7 @@ AcpiRsCreateAmlResources (
/* Do the conversion */
Status = AcpiRsConvertResourcesToAml (ResourceList->Pointer,
- AmlSizeNeeded, OutputBuffer->Pointer);
+ AmlSizeNeeded, OutputBuffer->Pointer);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
OpenPOWER on IntegriCloud