summaryrefslogtreecommitdiff
path: root/source/components/executer/exoparg1.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/executer/exoparg1.c')
-rw-r--r--source/components/executer/exoparg1.c69
1 files changed, 39 insertions, 30 deletions
diff --git a/source/components/executer/exoparg1.c b/source/components/executer/exoparg1.c
index e44dda776331..4d2d88f64862 100644
--- a/source/components/executer/exoparg1.c
+++ b/source/components/executer/exoparg1.c
@@ -331,7 +331,7 @@ AcpiExOpcode_1A_1T_1R (
* endian unsigned value, so this boundary condition is valid.
*/
for (Temp32 = 0; ReturnDesc->Integer.Value &&
- Temp32 < ACPI_INTEGER_BIT_SIZE; ++Temp32)
+ Temp32 < ACPI_INTEGER_BIT_SIZE; ++Temp32)
{
ReturnDesc->Integer.Value >>= 1;
}
@@ -348,7 +348,7 @@ AcpiExOpcode_1A_1T_1R (
* endian unsigned value, so this boundary condition is valid.
*/
for (Temp32 = 0; ReturnDesc->Integer.Value &&
- Temp32 < ACPI_INTEGER_BIT_SIZE; ++Temp32)
+ Temp32 < ACPI_INTEGER_BIT_SIZE; ++Temp32)
{
ReturnDesc->Integer.Value <<= 1;
}
@@ -454,7 +454,7 @@ AcpiExOpcode_1A_1T_1R (
/* Get the object reference, store it, and remove our reference */
Status = AcpiExGetObjectReference (Operand[0],
- &ReturnDesc2, WalkState);
+ &ReturnDesc2, WalkState);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -509,28 +509,30 @@ AcpiExOpcode_1A_1T_1R (
*/
case AML_COPY_OP: /* Copy (Source, Target) */
- Status = AcpiUtCopyIobjectToIobject (Operand[0], &ReturnDesc,
- WalkState);
+ Status = AcpiUtCopyIobjectToIobject (
+ Operand[0], &ReturnDesc, WalkState);
break;
case AML_TO_DECSTRING_OP: /* ToDecimalString (Data, Result) */
- Status = AcpiExConvertToString (Operand[0], &ReturnDesc,
- ACPI_EXPLICIT_CONVERT_DECIMAL);
+ Status = AcpiExConvertToString (
+ Operand[0], &ReturnDesc, ACPI_EXPLICIT_CONVERT_DECIMAL);
if (ReturnDesc == Operand[0])
{
/* No conversion performed, add ref to handle return value */
+
AcpiUtAddReference (ReturnDesc);
}
break;
case AML_TO_HEXSTRING_OP: /* ToHexString (Data, Result) */
- Status = AcpiExConvertToString (Operand[0], &ReturnDesc,
- ACPI_EXPLICIT_CONVERT_HEX);
+ Status = AcpiExConvertToString (
+ Operand[0], &ReturnDesc, ACPI_EXPLICIT_CONVERT_HEX);
if (ReturnDesc == Operand[0])
{
/* No conversion performed, add ref to handle return value */
+
AcpiUtAddReference (ReturnDesc);
}
break;
@@ -541,17 +543,19 @@ AcpiExOpcode_1A_1T_1R (
if (ReturnDesc == Operand[0])
{
/* No conversion performed, add ref to handle return value */
+
AcpiUtAddReference (ReturnDesc);
}
break;
case AML_TO_INTEGER_OP: /* ToInteger (Data, Result) */
- Status = AcpiExConvertToInteger (Operand[0], &ReturnDesc,
- ACPI_ANY_BASE);
+ Status = AcpiExConvertToInteger (
+ Operand[0], &ReturnDesc, ACPI_ANY_BASE);
if (ReturnDesc == Operand[0])
{
/* No conversion performed, add ref to handle return value */
+
AcpiUtAddReference (ReturnDesc);
}
break;
@@ -702,11 +706,11 @@ AcpiExOpcode_1A_0T_1R (
*/
if (WalkState->Opcode == AML_INCREMENT_OP)
{
- ReturnDesc->Integer.Value = TempDesc->Integer.Value +1;
+ ReturnDesc->Integer.Value = TempDesc->Integer.Value + 1;
}
else
{
- ReturnDesc->Integer.Value = TempDesc->Integer.Value -1;
+ ReturnDesc->Integer.Value = TempDesc->Integer.Value - 1;
}
/* Finished with this Integer object */
@@ -754,8 +758,8 @@ AcpiExOpcode_1A_0T_1R (
/* Get the base object */
- Status = AcpiExResolveMultiple (WalkState,
- Operand[0], &Type, &TempDesc);
+ Status = AcpiExResolveMultiple (
+ WalkState, Operand[0], &Type, &TempDesc);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -801,8 +805,10 @@ AcpiExOpcode_1A_0T_1R (
default:
ACPI_ERROR ((AE_INFO,
- "Operand must be Buffer/Integer/String/Package - found type %s",
+ "Operand must be Buffer/Integer/String/Package"
+ " - found type %s",
AcpiUtGetTypeName (Type)));
+
Status = AE_AML_OPERAND_TYPE;
goto Cleanup;
}
@@ -827,7 +833,8 @@ AcpiExOpcode_1A_0T_1R (
case AML_REF_OF_OP: /* RefOf (SourceObject) */
- Status = AcpiExGetObjectReference (Operand[0], &ReturnDesc, WalkState);
+ Status = AcpiExGetObjectReference (
+ Operand[0], &ReturnDesc, WalkState);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -874,9 +881,9 @@ AcpiExOpcode_1A_0T_1R (
/* Set Operand[0] to the value of the local/arg */
Status = AcpiDsMethodDataGetValue (
- Operand[0]->Reference.Class,
- Operand[0]->Reference.Value,
- WalkState, &TempDesc);
+ Operand[0]->Reference.Class,
+ Operand[0]->Reference.Value,
+ WalkState, &TempDesc);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -930,19 +937,19 @@ AcpiExOpcode_1A_0T_1R (
* Field, so we need to resolve the node to a value.
*/
Status = AcpiNsGetNode (WalkState->ScopeInfo->Scope.Node,
- Operand[0]->String.Pointer,
- ACPI_NS_SEARCH_PARENT,
- ACPI_CAST_INDIRECT_PTR (
- ACPI_NAMESPACE_NODE, &ReturnDesc));
+ Operand[0]->String.Pointer,
+ ACPI_NS_SEARCH_PARENT,
+ ACPI_CAST_INDIRECT_PTR (
+ ACPI_NAMESPACE_NODE, &ReturnDesc));
if (ACPI_FAILURE (Status))
{
goto Cleanup;
}
Status = AcpiExResolveNodeToValue (
- ACPI_CAST_INDIRECT_PTR (
- ACPI_NAMESPACE_NODE, &ReturnDesc),
- WalkState);
+ ACPI_CAST_INDIRECT_PTR (
+ ACPI_NAMESPACE_NODE, &ReturnDesc),
+ WalkState);
goto Cleanup;
}
}
@@ -958,7 +965,7 @@ AcpiExOpcode_1A_0T_1R (
* dereferenced above.
*/
ReturnDesc = AcpiNsGetAttachedObject (
- (ACPI_NAMESPACE_NODE *) Operand[0]);
+ (ACPI_NAMESPACE_NODE *) Operand[0]);
AcpiUtAddReference (ReturnDesc);
}
else
@@ -1025,6 +1032,7 @@ AcpiExOpcode_1A_0T_1R (
ACPI_ERROR ((AE_INFO,
"Unknown Index TargetType 0x%X in reference object %p",
Operand[0]->Reference.TargetType, Operand[0]));
+
Status = AE_AML_OPERAND_TYPE;
goto Cleanup;
}
@@ -1055,8 +1063,8 @@ AcpiExOpcode_1A_0T_1R (
case ACPI_TYPE_LOCAL_BANK_FIELD:
case ACPI_TYPE_LOCAL_INDEX_FIELD:
- Status = AcpiExReadDataFromField (WalkState,
- ReturnDesc, &TempDesc);
+ Status = AcpiExReadDataFromField (
+ WalkState, ReturnDesc, &TempDesc);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -1091,6 +1099,7 @@ AcpiExOpcode_1A_0T_1R (
ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
+
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
}