Print this page
acpica-unix2-20130823
PANKOVs restructure

@@ -3,11 +3,11 @@
  * Module Name: utcopy - Internal to external object translation utilities
  *
  *****************************************************************************/
 
 /*
- * 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:

@@ -170,11 +170,10 @@
         ACPI_MEMCPY ((void *) DataSpace,
             (void *) InternalObject->String.Pointer,
             (ACPI_SIZE) InternalObject->String.Length + 1);
         break;
 
-
     case ACPI_TYPE_BUFFER:
 
         ExternalObject->Buffer.Pointer = DataSpace;
         ExternalObject->Buffer.Length  = InternalObject->Buffer.Length;
         *BufferSpaceUsed = ACPI_ROUND_UP_TO_NATIVE_WORD (

@@ -183,25 +182,22 @@
         ACPI_MEMCPY ((void *) DataSpace,
             (void *) InternalObject->Buffer.Pointer,
             InternalObject->Buffer.Length);
         break;
 
-
     case ACPI_TYPE_INTEGER:
 
         ExternalObject->Integer.Value = InternalObject->Integer.Value;
         break;
 
-
     case ACPI_TYPE_LOCAL_REFERENCE:
 
         /* This is an object reference. */
 
         switch (InternalObject->Reference.Class)
         {
         case ACPI_REFCLASS_NAME:
-
             /*
              * For namepath, return the object handle ("reference")
              * We are referring to the namespace node
              */
             ExternalObject->Reference.Handle =

@@ -216,11 +212,10 @@
 
             return_ACPI_STATUS (AE_TYPE);
         }
         break;
 
-
     case ACPI_TYPE_PROCESSOR:
 
         ExternalObject->Processor.ProcId =
             InternalObject->Processor.ProcId;
         ExternalObject->Processor.PblkAddress =

@@ -227,21 +222,19 @@
             InternalObject->Processor.Address;
         ExternalObject->Processor.PblkLength =
             InternalObject->Processor.Length;
         break;
 
-
     case ACPI_TYPE_POWER:
 
         ExternalObject->PowerResource.SystemLevel =
             InternalObject->PowerResource.SystemLevel;
 
         ExternalObject->PowerResource.ResourceOrder =
             InternalObject->PowerResource.ResourceOrder;
         break;
 
-
     default:
         /*
          * There is no corresponding external object type
          */
         ACPI_ERROR ((AE_INFO,

@@ -289,11 +282,10 @@
         &((ACPI_OBJECT *)(State->Pkg.DestObject))->Package.Elements[ThisIndex];
 
     switch (ObjectType)
     {
     case ACPI_COPY_TYPE_SIMPLE:
-
         /*
          * This is a simple or null object
          */
         Status = AcpiUtCopyIsimpleToEsimple (SourceObject,
                         TargetObject, Info->FreeSpace, &ObjectSpace);

@@ -301,13 +293,11 @@
         {
             return (Status);
         }
         break;
 
-
     case ACPI_COPY_TYPE_PACKAGE:
-
         /*
          * Build the package object
          */
         TargetObject->Type              = ACPI_TYPE_PACKAGE;
         TargetObject->Package.Count     = SourceObject->Package.Count;

@@ -326,12 +316,12 @@
         ObjectSpace = ACPI_ROUND_UP_TO_NATIVE_WORD (
                             (ACPI_SIZE) TargetObject->Package.Count *
                             sizeof (ACPI_OBJECT));
         break;
 
-
     default:
+
         return (AE_BAD_PARAMETER);
     }
 
     Info->FreeSpace   += ObjectSpace;
     Info->Length      += ObjectSpace;

@@ -512,10 +502,11 @@
 
         *RetInternalObject = NULL;
         return_ACPI_STATUS (AE_OK);
 
     default:
+
         /* All other types are not supported */
 
         ACPI_ERROR ((AE_INFO,
             "Unsupported object type, cannot convert to internal object: %s",
             AcpiUtGetTypeName (ExternalObject->Type)));

@@ -544,11 +535,10 @@
                      ExternalObject->String.Length);
 
         InternalObject->String.Length  = ExternalObject->String.Length;
         break;
 
-
     case ACPI_TYPE_BUFFER:
 
         InternalObject->Buffer.Pointer =
             ACPI_ALLOCATE_ZEROED (ExternalObject->Buffer.Length);
         if (!InternalObject->Buffer.Pointer)

@@ -565,11 +555,10 @@
         /* Mark buffer data valid */
 
         InternalObject->Buffer.Flags |= AOPOBJ_DATA_VALID;
         break;
 
-
     case ACPI_TYPE_INTEGER:
 
         InternalObject->Integer.Value   = ExternalObject->Integer.Value;
         break;
 

@@ -580,11 +569,13 @@
         InternalObject->Reference.Class = ACPI_REFCLASS_NAME;
         InternalObject->Reference.Node = ExternalObject->Reference.Handle;
         break;
 
     default:
+
         /* Other types can't get here */
+
         break;
     }
 
     *RetInternalObject = InternalObject;
     return_ACPI_STATUS (AE_OK);

@@ -853,11 +844,13 @@
             return (Status);
         }
         break;
 
     default:
+
         /* Nothing to do for other simple objects */
+
         break;
     }
 
     return (AE_OK);
 }

@@ -927,13 +920,11 @@
 
             *ThisTargetPtr = NULL;
         }
         break;
 
-
     case ACPI_COPY_TYPE_PACKAGE:
-
         /*
          * This object is a package - go down another nesting level
          * Create and build the package object
          */
         TargetObject = AcpiUtCreatePackageObject (SourceObject->Package.Count);

@@ -951,12 +942,12 @@
         /* Store the object pointer in the parent package object */
 
         *ThisTargetPtr = TargetObject;
         break;
 
-
     default:
+
         return (AE_BAD_PARAMETER);
     }
 
     return (Status);
 

@@ -1072,7 +1063,5 @@
         Status = AcpiUtCopySimpleObject (SourceDesc, *DestDesc);
     }
 
     return_ACPI_STATUS (Status);
 }
-
-