Print this page
acpica-unix2-20130823
PANKOVs restructure
@@ -3,11 +3,11 @@
* Module Name: utobject - ACPI object create/delete/size/cache routines
*
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -138,10 +138,11 @@
Object->Common.NextObject = SecondObject;
break;
default:
+
/* All others have no secondary object */
break;
}
/* Save the object type in the object descriptor */
@@ -364,11 +365,11 @@
*
* PARAMETERS: Object - Object to be validated
*
* RETURN: TRUE if object is valid, FALSE otherwise
*
- * DESCRIPTION: Validate a pointer to be an ACPI_OPERAND_OBJECT
+ * DESCRIPTION: Validate a pointer to be of type ACPI_OPERAND_OBJECT
*
******************************************************************************/
BOOLEAN
AcpiUtValidInternalObject (
@@ -395,10 +396,11 @@
/* The object appears to be a valid ACPI_OPERAND_OBJECT */
return (TRUE);
default:
+
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"%p is not not an ACPI operand obj [%s]\n",
Object, AcpiUtGetDescriptorName (Object)));
break;
}
@@ -471,11 +473,11 @@
ACPI_OPERAND_OBJECT *Object)
{
ACPI_FUNCTION_TRACE_PTR (UtDeleteObjectDesc, Object);
- /* Object must be an ACPI_OPERAND_OBJECT */
+ /* Object must be of type ACPI_OPERAND_OBJECT */
if (ACPI_GET_DESCRIPTOR_TYPE (Object) != ACPI_DESC_TYPE_OPERAND)
{
ACPI_ERROR ((AE_INFO,
"%p is not an ACPI Operand object [%s]", Object,
@@ -554,32 +556,28 @@
case ACPI_TYPE_STRING:
Length += (ACPI_SIZE) InternalObject->String.Length + 1;
break;
-
case ACPI_TYPE_BUFFER:
Length += (ACPI_SIZE) InternalObject->Buffer.Length;
break;
-
case ACPI_TYPE_INTEGER:
case ACPI_TYPE_PROCESSOR:
case ACPI_TYPE_POWER:
/* No extra data for these types */
break;
-
case ACPI_TYPE_LOCAL_REFERENCE:
switch (InternalObject->Reference.Class)
{
case ACPI_REFCLASS_NAME:
-
/*
* Get the actual length of the full pathname to this object.
* The reference will be converted to the pathname to the object
*/
Size = AcpiNsGetPathnameLength (InternalObject->Reference.Node);
@@ -590,11 +588,10 @@
Length += ACPI_ROUND_UP_TO_NATIVE_WORD (Size);
break;
default:
-
/*
* No other reference opcodes are supported.
* Notably, Locals and Args are not supported, but this may be
* required eventually.
*/
@@ -605,11 +602,10 @@
Status = AE_TYPE;
break;
}
break;
-
default:
ACPI_ERROR ((AE_INFO, "Cannot convert to external object - "
"unsupported type [%s] 0x%X in object %p",
AcpiUtGetObjectTypeName (InternalObject),
@@ -654,11 +650,10 @@
switch (ObjectType)
{
case ACPI_COPY_TYPE_SIMPLE:
-
/*
* Simple object - just get the size (Null object/entry is handled
* here also) and sum it into the running package length
*/
Status = AcpiUtGetSimpleObjectSize (SourceObject, &ObjectSpace);
@@ -668,20 +663,18 @@
}
Info->Length += ObjectSpace;
break;
-
case ACPI_COPY_TYPE_PACKAGE:
/* Package object - nothing much to do here, let the walk handle it */
Info->NumPackages++;
State->Pkg.ThisTargetObj = NULL;
break;
-
default:
/* No other types allowed */
return (AE_BAD_PARAMETER);
@@ -781,7 +774,5 @@
Status = AcpiUtGetSimpleObjectSize (InternalObject, ObjLength);
}
return (Status);
}
-
-