From a2c2826ff489fda78d524c31326567360b99a712 Mon Sep 17 00:00:00 2001 From: Erik Schmauss Date: Mon, 12 Aug 2019 11:31:23 -0700 Subject: [PATCH] iASL: DT: simplify DtInitialize by removing redundant function calls DT compiler initializes by calling AcpiOsInitialize() and AcpiUtInitGlobals(). These are called as a part of main() and do not need to be invoked during data table compilation. Signed-off-by: Erik Schmauss --- source/compiler/dtcompile.c | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/source/compiler/dtcompile.c b/source/compiler/dtcompile.c index f5b895116..b6a144feb 100644 --- a/source/compiler/dtcompile.c +++ b/source/compiler/dtcompile.c @@ -161,7 +161,7 @@ static char VersionString[9]; /* Local prototypes */ -static ACPI_STATUS +void DtInitialize ( void); @@ -201,12 +201,7 @@ DtDoCompile ( /* Initialize globals */ - Status = DtInitialize (); - if (ACPI_FAILURE (Status)) - { - printf ("Error during compiler initialization, 0x%X\n", Status); - return (Status); - } + DtInitialize (); /* Preprocessor */ @@ -331,25 +326,12 @@ DtDoCompile ( * *****************************************************************************/ -static ACPI_STATUS +void DtInitialize ( void) { - ACPI_STATUS Status; - Status = AcpiOsInitialize (); - if (ACPI_FAILURE (Status)) - { - return (Status); - } - - Status = AcpiUtInitGlobals (); - if (ACPI_FAILURE (Status)) - { - return (Status); - } - AcpiUtSetIntegerWidth (2); /* Set width to 64 bits */ AslGbl_FieldList = NULL; @@ -357,7 +339,7 @@ DtInitialize ( AslGbl_SubtableStack = NULL; sprintf (VersionString, "%X", (UINT32) ACPI_CA_VERSION); - return (AE_OK); + return; }