From dceba6cbd1fffedb4110f672f77168234a409521 Mon Sep 17 00:00:00 2001 From: rmoore1 Date: Thu, 30 Aug 2007 23:03:19 +0000 Subject: [PATCH] Automated cleanup. Cleanup via acpisrc. --- source/common/adisasm.c | 27 ++- source/compiler/aslcompiler.h | 6 +- source/compiler/aslerror.c | 12 +- source/compiler/aslmain.c | 28 +-- source/compiler/asloperands.c | 22 +- source/compiler/aslstartup.c | 224 +++++++++---------- source/components/parser/psparse.c | 4 +- source/components/tables/tbfadt.c | 8 +- source/include/acapps.h | 2 +- source/os_specific/service_layers/oswindir.c | 12 +- 10 files changed, 172 insertions(+), 173 deletions(-) diff --git a/source/common/adisasm.c b/source/common/adisasm.c index b0f23ce5f..fd5f20d34 100644 --- a/source/common/adisasm.c +++ b/source/common/adisasm.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: adisasm - Application-level disassembler routines - * $Revision: 1.105 $ + * $Revision: 1.106 $ * *****************************************************************************/ @@ -547,7 +547,7 @@ AdAmlDisassemble ( Status = AcpiNsRootInitialize (); AdAddExternalsToNamespace (); - /* Parse table. No need to reload it, however (FALSE) */ + /* Parse table. No need to reload it, however (FALSE) */ Status = AdParseTable (Table, FALSE); if (ACPI_FAILURE (Status)) @@ -587,7 +587,7 @@ Cleanup: } AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot); - AcpiGbl_ParseOpRoot = NULL; + AcpiGbl_ParseOpRoot = NULL; return (Status); } @@ -1050,7 +1050,7 @@ AdGetLocalTables ( ACPI_STATUS AdParseTable ( ACPI_TABLE_HEADER *Table, - BOOLEAN LoadTable) + BOOLEAN LoadTable) { ACPI_STATUS Status = AE_OK; ACPI_WALK_STATE *WalkState; @@ -1106,15 +1106,15 @@ AdParseTable ( /* Pass 2 */ - if (LoadTable) - { - Status = AcpiTbStoreTable ((ACPI_NATIVE_UINT) Table, Table, - Table->Length, ACPI_TABLE_ORIGIN_ALLOCATED, &TableIndex); - if (ACPI_FAILURE (Status)) - { - return Status; - } - } + if (LoadTable) + { + Status = AcpiTbStoreTable ((ACPI_NATIVE_UINT) Table, Table, + Table->Length, ACPI_TABLE_ORIGIN_ALLOCATED, &TableIndex); + if (ACPI_FAILURE (Status)) + { + return Status; + } + } fprintf (stderr, "Pass 2 parse of [%4.4s]\n", (char *) Table->Signature); @@ -1137,4 +1137,3 @@ AdParseTable ( } - diff --git a/source/compiler/aslcompiler.h b/source/compiler/aslcompiler.h index 8f2872cb4..0761339c1 100644 --- a/source/compiler/aslcompiler.h +++ b/source/compiler/aslcompiler.h @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: aslcompiler.h - common include file for iASL - * $Revision: 1.149 $ + * $Revision: 1.150 $ * *****************************************************************************/ @@ -193,7 +193,7 @@ AslPushInputFileStack ( */ ACPI_STATUS AslDoOnePathname ( - char *Pathname); + char *Pathname); /* * aslcompile - compile mainline @@ -315,7 +315,7 @@ AePrintErrorLog ( void AeClearErrorLog ( - void); + void); ACPI_PHYSICAL_ADDRESS AeLocalGetRootPointer ( diff --git a/source/compiler/aslerror.c b/source/compiler/aslerror.c index 6ecf84bef..fb9ba2a39 100644 --- a/source/compiler/aslerror.c +++ b/source/compiler/aslerror.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: aslerror - Error handling and statistics - * $Revision: 1.93 $ + * $Revision: 1.94 $ * *****************************************************************************/ @@ -130,7 +130,7 @@ AeAddToErrorLog ( void AeClearErrorLog ( - void) + void) { ASL_ERROR_MSG *Enode = Gbl_ErrorLog; ASL_ERROR_MSG *Next; @@ -139,12 +139,12 @@ AeClearErrorLog ( while (Enode) { - Next = Enode->Next; + Next = Enode->Next; ACPI_FREE (Enode); Enode = Next; } - Gbl_ErrorLog = NULL; + Gbl_ErrorLog = NULL; } @@ -309,7 +309,7 @@ AePrintException ( { fprintf (OutputFile, "[*** iASL: Seek error on source code temp file %s ***]", - Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename); + Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename); } else { @@ -318,7 +318,7 @@ AePrintException ( { fprintf (OutputFile, "[*** iASL: Read error on source code temp file %s ***]", - Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename); + Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename); } else while (RActual && SourceByte && (SourceByte != '\n')) diff --git a/source/compiler/aslmain.c b/source/compiler/aslmain.c index 3a3368774..00d4d11c3 100644 --- a/source/compiler/aslmain.c +++ b/source/compiler/aslmain.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: aslmain - compiler main and utilities - * $Revision: 1.97 $ + * $Revision: 1.98 $ * *****************************************************************************/ @@ -709,7 +709,7 @@ AslCommandLine ( exit (1); } - return (AcpiGbl_Optind); + return (AcpiGbl_Optind); } @@ -732,7 +732,7 @@ main ( char **argv) { ACPI_STATUS Status; - int Index; + int Index; #ifdef _DEBUG @@ -745,20 +745,20 @@ main ( AslInitialize (); Index = AslCommandLine (argc, argv); - /* Process each pathname/filename in the list, with possible wildcards */ + /* Process each pathname/filename in the list, with possible wildcards */ - while (argv[Index]) - { - Status = AslDoOnePathname (argv[Index]); - if (ACPI_FAILURE (Status)) - { - return (-1); - } + while (argv[Index]) + { + Status = AslDoOnePathname (argv[Index]); + if (ACPI_FAILURE (Status)) + { + return (-1); + } - Index++; - } + Index++; + } - return (0); + return (0); } diff --git a/source/compiler/asloperands.c b/source/compiler/asloperands.c index f90f43236..5d2c3e9f3 100644 --- a/source/compiler/asloperands.c +++ b/source/compiler/asloperands.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: asloperands - AML operand processing - * $Revision: 1.62 $ + * $Revision: 1.63 $ * *****************************************************************************/ @@ -949,7 +949,7 @@ OpnDoDefinitionBlock ( ACPI_PARSE_OBJECT *Child; ACPI_SIZE Length; ACPI_NATIVE_UINT i; - char *Filename; + char *Filename; /* @@ -967,17 +967,17 @@ OpnDoDefinitionBlock ( *Child->Asl.Value.Buffer && (Gbl_UseDefaultAmlFilename)) { - /* - * We will use the AML filename that is embedded in the source file - * for the output filename. - */ - Filename = ACPI_ALLOCATE (strlen (Gbl_DirectoryPath) + - strlen ((char *) Child->Asl.Value.Buffer) + 1); + /* + * We will use the AML filename that is embedded in the source file + * for the output filename. + */ + Filename = ACPI_ALLOCATE (strlen (Gbl_DirectoryPath) + + strlen ((char *) Child->Asl.Value.Buffer) + 1); - /* Prepend the current directory path */ + /* Prepend the current directory path */ - strcpy (Filename, Gbl_DirectoryPath); - strcat (Filename, (char *) Child->Asl.Value.Buffer); + strcpy (Filename, Gbl_DirectoryPath); + strcat (Filename, (char *) Child->Asl.Value.Buffer); Gbl_OutputFilenamePrefix = Filename; } diff --git a/source/compiler/aslstartup.c b/source/compiler/aslstartup.c index 8dbe69845..ac395fb19 100644 --- a/source/compiler/aslstartup.c +++ b/source/compiler/aslstartup.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: aslstartup - Compiler startup routines, called from main - * $Revision: 1.1 $ + * $Revision: 1.2 $ * *****************************************************************************/ @@ -125,9 +125,9 @@ ACPI_MODULE_NAME ("aslstartup") -#define ASL_MAX_FILES 256 -char *FileList[ASL_MAX_FILES]; -int FileCount; +#define ASL_MAX_FILES 256 +char *FileList[ASL_MAX_FILES]; +int FileCount; BOOLEAN AslToFile = TRUE; @@ -135,7 +135,7 @@ BOOLEAN AslToFile = TRUE; static void AslInitializeGlobals ( - void); + void); static char ** AsDoWildcard ( @@ -156,35 +156,35 @@ AslDoOneFile ( * RETURN: None * * DESCRIPTION: Re-initialize globals needed to restart the compiler. This - * allows multiple files to be disassembled and/or compiled. + * allows multiple files to be disassembled and/or compiled. * ******************************************************************************/ static void AslInitializeGlobals ( - void) + void) { - UINT32 i; + UINT32 i; - /* Init compiler globals */ + /* Init compiler globals */ - Gbl_CurrentColumn = 0; - Gbl_CurrentLineNumber = 1; - Gbl_LogicalLineNumber = 1; - Gbl_CurrentLineOffset = 0; - Gbl_LineBufPtr = Gbl_CurrentLineBuffer; + Gbl_CurrentColumn = 0; + Gbl_CurrentLineNumber = 1; + Gbl_LogicalLineNumber = 1; + Gbl_CurrentLineOffset = 0; + Gbl_LineBufPtr = Gbl_CurrentLineBuffer; - Gbl_ErrorLog = NULL; - Gbl_NextError = NULL; + Gbl_ErrorLog = NULL; + Gbl_NextError = NULL; - AslGbl_NextEvent = 0; - for (i = 0; i < ASL_NUM_REPORT_LEVELS; i++) - { - Gbl_ExceptionCount[i] = 0; - } + AslGbl_NextEvent = 0; + for (i = 0; i < ASL_NUM_REPORT_LEVELS; i++) + { + Gbl_ExceptionCount[i] = 0; + } - Gbl_Files[ASL_FILE_AML_OUTPUT].Filename = NULL; + Gbl_Files[ASL_FILE_AML_OUTPUT].Filename = NULL; } @@ -197,7 +197,7 @@ AslInitializeGlobals ( * RETURN: None * * DESCRIPTION: Process files via wildcards. This function is for the Windows - * case only. + * case only. * ******************************************************************************/ @@ -211,29 +211,29 @@ AsDoWildcard ( char *Filename; - FileCount = 0; + FileCount = 0; - /* Open parent directory */ + /* Open parent directory */ DirInfo = AcpiOsOpenDirectory (DirectoryPathname, FileSpecifier, REQUEST_FILE_ONLY); if (DirInfo) { - /* Process each file that matches the wildcard specification */ + /* Process each file that matches the wildcard specification */ while ((Filename = AcpiOsGetNextFilename (DirInfo))) { - /* Add the filename to the file list */ + /* Add the filename to the file list */ - FileList[FileCount] = AcpiOsAllocate (strlen (Filename) + 1); - strcpy (FileList[FileCount], Filename); - FileCount++; - - if (FileCount >= ASL_MAX_FILES) - { - printf ("Max files reached\n"); - FileList[0] = NULL; - return (FileList); - } + FileList[FileCount] = AcpiOsAllocate (strlen (Filename) + 1); + strcpy (FileList[FileCount], Filename); + FileCount++; + + if (FileCount >= ASL_MAX_FILES) + { + printf ("Max files reached\n"); + FileList[0] = NULL; + return (FileList); + } } /* Cleanup */ @@ -241,18 +241,18 @@ AsDoWildcard ( AcpiOsCloseDirectory (DirInfo); } - FileList[FileCount] = NULL; - return (FileList); + FileList[FileCount] = NULL; + return (FileList); -#else - /* - * Linux/Unix cases - Wildcards are expanded by the shell automatically. - * Just return the filename in a null terminated list - */ - FileList[0] = FileSpecifier; - FileList[1] = NULL; +#else + /* + * Linux/Unix cases - Wildcards are expanded by the shell automatically. + * Just return the filename in a null terminated list + */ + FileList[0] = FileSpecifier; + FileList[1] = NULL; - return (FileList); + return (FileList); #endif } @@ -261,7 +261,7 @@ AsDoWildcard ( * * FUNCTION: AslDoOneFile * - * PARAMETERS: Filename - Name of the file + * PARAMETERS: Filename - Name of the file * * RETURN: Status * @@ -273,18 +273,18 @@ static ACPI_STATUS AslDoOneFile ( char *Filename) { - ACPI_STATUS Status; + ACPI_STATUS Status; - Gbl_Files[ASL_FILE_INPUT].Filename = Filename; + Gbl_Files[ASL_FILE_INPUT].Filename = Filename; - /* Re-initialize "some" compiler globals */ + /* Re-initialize "some" compiler globals */ - AslInitializeGlobals (); + AslInitializeGlobals (); /* - * AML Disassembly (Optional) - */ + * AML Disassembly (Optional) + */ if (Gbl_DisasmFlag || Gbl_GetAllTables) { /* ACPI CA subsystem initialization */ @@ -307,19 +307,19 @@ AslDoOneFile ( AcpiGbl_DbOpt_disasm = TRUE; Status = AdAmlDisassemble (AslToFile, - Gbl_Files[ASL_FILE_INPUT].Filename, - Gbl_OutputFilenamePrefix, - &Gbl_Files[ASL_FILE_INPUT].Filename, - Gbl_GetAllTables); + Gbl_Files[ASL_FILE_INPUT].Filename, + Gbl_OutputFilenamePrefix, + &Gbl_Files[ASL_FILE_INPUT].Filename, + Gbl_GetAllTables); if (ACPI_FAILURE (Status)) { return (Status); } - /* Shutdown compiler and ACPICA subsystem */ + /* Shutdown compiler and ACPICA subsystem */ - AeClearErrorLog (); - AcpiTerminate (); + AeClearErrorLog (); + AcpiTerminate (); /* * Gbl_Files[ASL_FILE_INPUT].Filename was replaced with the @@ -355,19 +355,19 @@ AslDoOneFile ( } Status = CmDoCompile (); - AcpiTerminate (); + AcpiTerminate (); - /* - * Return non-zero exit code if there have been errors, unless the - * global ignore error flag has been set - */ - if ((Gbl_ExceptionCount[ASL_ERROR] > 0) && (!Gbl_IgnoreErrors)) - { - return (AE_ERROR); - } + /* + * Return non-zero exit code if there have been errors, unless the + * global ignore error flag has been set + */ + if ((Gbl_ExceptionCount[ASL_ERROR] > 0) && (!Gbl_IgnoreErrors)) + { + return (AE_ERROR); + } - AeClearErrorLog (); - } + AeClearErrorLog (); + } return (AE_OK); } @@ -377,66 +377,66 @@ AslDoOneFile ( * * FUNCTION: AslDoOnePathname * - * PARAMETERS: Pathname - Full pathname, possibly with wildcards + * PARAMETERS: Pathname - Full pathname, possibly with wildcards * * RETURN: Status * * DESCRIPTION: Process one pathname, possible terminated with a wildcard - * specification. If a wildcard, it is expanded and the multiple - * files are processed. + * specification. If a wildcard, it is expanded and the multiple + * files are processed. * ******************************************************************************/ ACPI_STATUS AslDoOnePathname ( - char *Pathname) + char *Pathname) { - ACPI_STATUS Status; - char **FileList; + ACPI_STATUS Status; + char **FileList; char *Filename; - char *FullPathname; + char *FullPathname; - /* Split incoming path into a directory/filename combo */ + /* Split incoming path into a directory/filename combo */ - Status = FlSplitInputPathname (Pathname, &Gbl_DirectoryPath, &Filename); - if (ACPI_FAILURE (Status)) - { - return (Status); - } + Status = FlSplitInputPathname (Pathname, &Gbl_DirectoryPath, &Filename); + if (ACPI_FAILURE (Status)) + { + return (Status); + } - /* Expand possible wildcard into a file list (Windows/DOS only) */ + /* Expand possible wildcard into a file list (Windows/DOS only) */ - FileList = AsDoWildcard (Gbl_DirectoryPath, Filename); - while (*FileList) - { - FullPathname = ACPI_ALLOCATE ( - strlen (Gbl_DirectoryPath) + strlen (*FileList) + 1); + FileList = AsDoWildcard (Gbl_DirectoryPath, Filename); + while (*FileList) + { + FullPathname = ACPI_ALLOCATE ( + strlen (Gbl_DirectoryPath) + strlen (*FileList) + 1); - /* Construct a full path to the file */ + /* Construct a full path to the file */ - strcpy (FullPathname, Gbl_DirectoryPath); - strcat (FullPathname, *FileList); + strcpy (FullPathname, Gbl_DirectoryPath); + strcat (FullPathname, *FileList); - /* - * If -p not specified, we will use the input filename as the - * output filename prefix - */ - if (Gbl_UseDefaultAmlFilename) - { - Gbl_OutputFilenamePrefix = FullPathname; - } + /* + * If -p not specified, we will use the input filename as the + * output filename prefix + */ + if (Gbl_UseDefaultAmlFilename) + { + Gbl_OutputFilenamePrefix = FullPathname; + } - Status = AslDoOneFile (FullPathname); - if (ACPI_FAILURE (Status)) - { - return (Status); - } - - ACPI_FREE (FullPathname); - FileList++; - } + Status = AslDoOneFile (FullPathname); + if (ACPI_FAILURE (Status)) + { + return (Status); + } - return (AE_OK); + ACPI_FREE (FullPathname); + FileList++; + } + + return (AE_OK); } diff --git a/source/components/parser/psparse.c b/source/components/parser/psparse.c index a46d0db4b..615a0de99 100644 --- a/source/components/parser/psparse.c +++ b/source/components/parser/psparse.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: psparse - Parser top level AML parse routines - * $Revision: 1.172 $ + * $Revision: 1.173 $ * *****************************************************************************/ @@ -631,7 +631,7 @@ AcpiPsParseAml ( (!WalkState->MethodDesc->Method.Mutex)) { ACPI_INFO ((AE_INFO, - "Marking method %4.4s as Serialized because of AE_ALREADY_EXISTS error", + "Marking method %4.4s as Serialized because of AE_ALREADY_EXISTS error", WalkState->MethodNode->Name.Ascii)); /* diff --git a/source/components/tables/tbfadt.c b/source/components/tables/tbfadt.c index 4749f0d9d..a01a6e2f4 100644 --- a/source/components/tables/tbfadt.c +++ b/source/components/tables/tbfadt.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: tbfadt - FADT table utilities - * $Revision: 1.6 $ + * $Revision: 1.7 $ * *****************************************************************************/ @@ -317,7 +317,7 @@ AcpiTbCreateLocalFadt ( /* * Check if the FADT is larger than the largest table that we expect - * (the ACPI 2.0/3.0 version). If so, truncate the table, and issue + * (the ACPI 2.0/3.0 version). If so, truncate the table, and issue * a warning. */ if (Length > sizeof (ACPI_TABLE_FADT)) @@ -399,11 +399,11 @@ AcpiTbConvertFadt ( AcpiGbl_FADT.XDsdt = (UINT64) AcpiGbl_FADT.Dsdt; } - /* + /* * For ACPI 1.0 FADTs (revision 1 or 2), ensure that reserved fields which * should be zero are indeed zero. This will workaround BIOSs that * inadvertently place values in these fields. - * + * * The ACPI 1.0 reserved fields that will be zeroed are the bytes located at * offset 45, 55, 95, and the word located at offset 109, 110. */ diff --git a/source/include/acapps.h b/source/include/acapps.h index bc905811c..8f0a8ff59 100644 --- a/source/include/acapps.h +++ b/source/include/acapps.h @@ -169,7 +169,7 @@ AdGetLocalTables ( ACPI_STATUS AdParseTable ( ACPI_TABLE_HEADER *Table, - BOOLEAN LoadTable); + BOOLEAN LoadTable); ACPI_STATUS AdDisplayTables ( diff --git a/source/os_specific/service_layers/oswindir.c b/source/os_specific/service_layers/oswindir.c index 2cfb978ad..c5095be28 100644 --- a/source/os_specific/service_layers/oswindir.c +++ b/source/os_specific/service_layers/oswindir.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: oswindir - Windows directory access interfaces - * $Revision: 1.9 $ + * $Revision: 1.10 $ * *****************************************************************************/ @@ -160,12 +160,12 @@ AcpiOsOpenDirectory ( EXTERNAL_FIND_INFO *SearchInfo; - /* No directory path means "use current directory" - use a dot */ + /* No directory path means "use current directory" - use a dot */ - if (!DirPathname || strlen (DirPathname) == 0) - { - DirPathname = "."; - } + if (!DirPathname || strlen (DirPathname) == 0) + { + DirPathname = "."; + } /* Allocate the info struct that will be returned to the caller */