diff --git a/source/components/utilities/utalloc.c b/source/components/utilities/utalloc.c index 5f9c8e624..bf21bfa38 100644 --- a/source/components/utilities/utalloc.c +++ b/source/components/utilities/utalloc.c @@ -161,12 +161,12 @@ AcpiCmSearchAllocList ( { if (Element == NULL) { - return NULL; + return (NULL); } if (Element->Address == Address) { - return Element; + return (Element); } Element = Element->Next; diff --git a/source/components/utilities/utclib.c b/source/components/utilities/utclib.c index f0057b175..959fa339e 100644 --- a/source/components/utilities/utclib.c +++ b/source/components/utilities/utclib.c @@ -153,7 +153,7 @@ NATIVE_UINT AcpiCmStrlen ( - const char *String) + const INT8 *String) { NATIVE_UINT Length = 0; @@ -166,7 +166,7 @@ AcpiCmStrlen ( String++; } - return Length; + return (Length); } @@ -183,12 +183,12 @@ AcpiCmStrlen ( * ******************************************************************************/ -char * +INT8 * AcpiCmStrcpy ( - char *DstString, - const char *SrcString) + INT8 *DstString, + const INT8 *SrcString) { - char *String = DstString; + INT8 *String = DstString; /* Move bytes brute force */ @@ -205,7 +205,7 @@ AcpiCmStrcpy ( *String = 0; - return DstString; + return (DstString); } @@ -223,13 +223,13 @@ AcpiCmStrcpy ( * ******************************************************************************/ -char * +INT8 * AcpiCmStrncpy ( - char *DstString, - const char *SrcString, + INT8 *DstString, + const INT8 *SrcString, NATIVE_UINT Count) { - char *String = DstString; + INT8 *String = DstString; /* Copy the string */ @@ -248,7 +248,7 @@ AcpiCmStrncpy ( /* Return original pointer */ - return DstString; + return (DstString); } @@ -267,8 +267,8 @@ AcpiCmStrncpy ( UINT32 AcpiCmStrcmp ( - const char *String1, - const char *String2) + const INT8 *String1, + const INT8 *String2) { @@ -276,12 +276,12 @@ AcpiCmStrcmp ( { if (!*String1++) { - return 0; + return (0); } } - return (unsigned char) *String1 - (unsigned char) *String2; + return ((unsigned char) *String1 - (unsigned char) *String2); } @@ -301,8 +301,8 @@ AcpiCmStrcmp ( UINT32 AcpiCmStrncmp ( - const char *String1, - const char *String2, + const INT8 *String1, + const INT8 *String2, NATIVE_UINT Count) { @@ -311,12 +311,12 @@ AcpiCmStrncmp ( { if (!*String1++) { - return 0; + return (0); } } - return (Count == -1) ? 0 : ((unsigned char) *String1 - - (unsigned char) *String2); + return ((Count == -1) ? 0 : ((unsigned char) *String1 - + (unsigned char) *String2)); } @@ -333,12 +333,12 @@ AcpiCmStrncmp ( * ******************************************************************************/ -char * +INT8 * AcpiCmStrcat ( - char *DstString, - const char *SrcString) + INT8 *DstString, + const INT8 *SrcString) { - char *String; + INT8 *String; /* Find end of the destination string */ @@ -351,7 +351,7 @@ AcpiCmStrcat ( for (--String; (*String++ = *SrcString++); ) { ; } - return DstString; + return (DstString); } @@ -370,13 +370,13 @@ AcpiCmStrcat ( * ******************************************************************************/ -char * +INT8 * AcpiCmStrncat ( - char *DstString, - const char *SrcString, + INT8 *DstString, + const INT8 *SrcString, NATIVE_UINT Count) { - char *String; + INT8 *String; if (Count) @@ -399,7 +399,7 @@ AcpiCmStrncat ( } } - return DstString; + return (DstString); } @@ -423,8 +423,8 @@ AcpiCmMemcpy ( const void *Src, NATIVE_UINT Count) { - char *New = (char *) Dest; - char *Old = (char *) Src; + INT8 *New = (INT8 *) Dest; + INT8 *Old = (INT8 *) Src; while (Count) @@ -435,7 +435,7 @@ AcpiCmMemcpy ( Count--; } - return Dest; + return (Dest); } @@ -459,7 +459,7 @@ AcpiCmMemset ( INT32 Value, NATIVE_UINT Count) { - char *New = (char *) Dest; + INT8 *New = (INT8 *) Dest; while (Count) @@ -469,7 +469,7 @@ AcpiCmMemset ( Count--; } - return Dest; + return (Dest); } @@ -488,7 +488,7 @@ AcpiCmMemset ( #define _UP 0x01 /* 'A'-'Z' */ #define _XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */ -const unsigned char _ctype[257] = { +const UINT8 _ctype[257] = { _CN, /* 0x0 0. */ _CN, /* 0x1 1. */ _CN, /* 0x2 2. */ @@ -688,11 +688,11 @@ AcpiCmToLower ( * ******************************************************************************/ -char * +INT8 * AcpiCmStrupr ( - char *SrcString) + INT8 *SrcString) { - char *String; + INT8 *String; /* Walk entire string, uppercasing the letters */ @@ -704,7 +704,7 @@ AcpiCmStrupr ( } - return SrcString; + return (SrcString); } @@ -723,17 +723,17 @@ AcpiCmStrupr ( * ******************************************************************************/ -char * +INT8 * AcpiCmStrstr ( - char *String1, - char *String2) + INT8 *String1, + INT8 *String2) { - char *String; + INT8 *String; if (AcpiCmStrlen (String2) > AcpiCmStrlen (String1)) { - return NULL; + return (NULL); } /* Walk entire string, uppercasing the letters */ @@ -742,7 +742,7 @@ AcpiCmStrstr ( { if (*String2 != *String) { - return NULL; + return (NULL); } String2++; @@ -750,7 +750,7 @@ AcpiCmStrstr ( } - return String1; + return (String1); } @@ -770,14 +770,14 @@ AcpiCmStrstr ( UINT32 AcpiCmStrtoul ( - const char *String, - char **Terminator, + const INT8 *String, + INT8 **Terminator, INT32 Base) { UINT32 converted = 0; INT32 index; UINT32 sign; - const char *StringStart; + const INT8 *StringStart; UINT32 ReturnValue = 0; ACPI_STATUS Status = AE_OK; @@ -925,12 +925,12 @@ done: { if (converted == 0 && ReturnValue == 0L && String != NULL) { - *Terminator = (char *) StringStart; + *Terminator = (INT8 *) StringStart; } else { - *Terminator = (char *) String; + *Terminator = (INT8 *) String; } } diff --git a/source/components/utilities/utdebug.c b/source/components/utilities/utdebug.c index 8641e706b..05bb9779a 100644 --- a/source/components/utilities/utdebug.c +++ b/source/components/utilities/utdebug.c @@ -137,7 +137,7 @@ INT32 GetDebugLevel (void) { - return AcpiDbgLevel; + return (AcpiDbgLevel); } void @@ -167,16 +167,18 @@ SetDebugLevel ( void FunctionTrace ( - char *ModuleName, + INT8 *ModuleName, INT32 LineNumber, INT32 ComponentId, - char *FunctionName) + INT8 *FunctionName) { AcpiGbl_NestingLevel++; - DebugPrint (ModuleName, LineNumber, ComponentId, TRACE_FUNCTIONS, - " %2.2ld Entered Function: %s\n", AcpiGbl_NestingLevel, FunctionName); + DebugPrint (ModuleName, LineNumber, ComponentId, + TRACE_FUNCTIONS, + " %2.2ld Entered Function: %s\n", + AcpiGbl_NestingLevel, FunctionName); } @@ -199,10 +201,10 @@ FunctionTrace ( void FunctionTracePtr ( - char *ModuleName, + INT8 *ModuleName, INT32 LineNumber, INT32 ComponentId, - char *FunctionName, + INT8 *FunctionName, void *Pointer) { @@ -232,11 +234,11 @@ FunctionTracePtr ( void FunctionTraceStr ( - char *ModuleName, + INT8 *ModuleName, INT32 LineNumber, INT32 ComponentId, - char *FunctionName, - char *String) + INT8 *FunctionName, + INT8 *String) { AcpiGbl_NestingLevel++; @@ -265,10 +267,10 @@ FunctionTraceStr ( void FunctionTraceU32 ( - char *ModuleName, + INT8 *ModuleName, INT32 LineNumber, INT32 ComponentId, - char *FunctionName, + INT8 *FunctionName, UINT32 Integer) { @@ -297,14 +299,16 @@ FunctionTraceU32 ( void FunctionExit ( - char *ModuleName, + INT8 *ModuleName, INT32 LineNumber, INT32 ComponentId, - char *FunctionName) + INT8 *FunctionName) { DebugPrint (ModuleName, LineNumber, ComponentId, TRACE_FUNCTIONS, - " %2.2ld Exiting Function: %s\n", AcpiGbl_NestingLevel, FunctionName); + " %2.2ld Exiting Function: %s\n", + AcpiGbl_NestingLevel, FunctionName); + AcpiGbl_NestingLevel--; } @@ -328,25 +332,31 @@ FunctionExit ( void FunctionStatusExit ( - char *ModuleName, + INT8 *ModuleName, INT32 LineNumber, INT32 ComponentId, - char *FunctionName, + INT8 *FunctionName, ACPI_STATUS Status) { if (Status > ACPI_MAX_STATUS) { - DebugPrint (ModuleName, LineNumber, ComponentId, TRACE_FUNCTIONS, - " %2.2ld Exiting Function: %s, [Unknown Status] 0x%X\n", - AcpiGbl_NestingLevel, FunctionName, Status); + DebugPrint (ModuleName, LineNumber, ComponentId, + TRACE_FUNCTIONS, + " %2.2ld Exiting Function: %s, [Unknown Status] 0x%X\n", + AcpiGbl_NestingLevel, + FunctionName, + Status); } else { - DebugPrint (ModuleName, LineNumber, ComponentId, TRACE_FUNCTIONS, - " %2.2ld Exiting Function: %s, %s\n", - AcpiGbl_NestingLevel, FunctionName, AcpiCmFormatException (Status)); + DebugPrint (ModuleName, LineNumber, ComponentId, + TRACE_FUNCTIONS, + " %2.2ld Exiting Function: %s, %s\n", + AcpiGbl_NestingLevel, + FunctionName, + AcpiCmFormatException (Status)); } AcpiGbl_NestingLevel--; @@ -372,16 +382,17 @@ FunctionStatusExit ( void FunctionValueExit ( - char *ModuleName, + INT8 *ModuleName, INT32 LineNumber, INT32 ComponentId, - char *FunctionName, + INT8 *FunctionName, NATIVE_UINT Value) { DebugPrint (ModuleName, LineNumber, ComponentId, TRACE_FUNCTIONS, " %2.2ld Exiting Function: %s, 0x%X\n", AcpiGbl_NestingLevel, FunctionName, Value); + AcpiGbl_NestingLevel--; } @@ -405,16 +416,17 @@ FunctionValueExit ( void FunctionPtrExit ( - char *ModuleName, + INT8 *ModuleName, INT32 LineNumber, INT32 ComponentId, - char *FunctionName, - char *Ptr) + INT8 *FunctionName, + INT8 *Ptr) { DebugPrint (ModuleName, LineNumber, ComponentId, TRACE_FUNCTIONS, " %2.2ld Exiting Function: %s, 0x%p\n", AcpiGbl_NestingLevel, FunctionName, Ptr); + AcpiGbl_NestingLevel--; } @@ -439,11 +451,11 @@ FunctionPtrExit ( void DebugPrint ( - char *ModuleName, + INT8 *ModuleName, INT32 LineNumber, INT32 ComponentId, INT32 PrintLevel, - char *Format, + INT8 *Format, ...) { va_list args; @@ -451,12 +463,13 @@ DebugPrint ( /* Both the level and the component must be enabled */ - if ((PrintLevel & AcpiDbgLevel) && (ComponentId & AcpiDbgLayer)) + if ((PrintLevel & AcpiDbgLevel) && + (ComponentId & AcpiDbgLayer)) { va_start (args, Format); - AcpiOsdPrintf ("%8s-%04d: ", ModuleName, LineNumber); - AcpiOsdVprintf (Format, args); + AcpiOsPrintf ("%8s-%04d: ", ModuleName, LineNumber); + AcpiOsVprintf (Format, args); } } @@ -478,12 +491,12 @@ DebugPrint ( void DebugPrintPrefix ( - char *ModuleName, + INT8 *ModuleName, INT32 LineNumber) { - AcpiOsdPrintf ("%8s-%04d: ", ModuleName, LineNumber); + AcpiOsPrintf ("%8s-%04d: ", ModuleName, LineNumber); } @@ -502,7 +515,7 @@ DebugPrintPrefix ( void DebugPrintRaw ( - char *Format, + INT8 *Format, ...) { va_list args; @@ -510,7 +523,7 @@ DebugPrintRaw ( va_start (args, Format); - AcpiOsdVprintf (Format, args); + AcpiOsVprintf (Format, args); va_end (args); } @@ -532,7 +545,7 @@ DebugPrintRaw ( void AcpiCmDumpBuffer ( - char *Buffer, + INT8 *Buffer, UINT32 Count, UINT32 Display, INT32 ComponentId) @@ -545,7 +558,8 @@ AcpiCmDumpBuffer ( /* Only dump the buffer if tracing is enabled */ - if (!((TRACE_TABLES & AcpiDbgLevel) && (ComponentId & AcpiDbgLayer))) + if (!((TRACE_TABLES & AcpiDbgLevel) && + (ComponentId & AcpiDbgLayer))) { return; } @@ -558,7 +572,7 @@ AcpiCmDumpBuffer ( { /* Print current offset */ - AcpiOsdPrintf ("%05X ", i); + AcpiOsPrintf ("%05X ", i); /* Print 16 hex chars */ @@ -567,11 +581,11 @@ AcpiCmDumpBuffer ( { if (i + j >= Count) { - AcpiOsdPrintf ("\n"); + AcpiOsPrintf ("\n"); return; } - /* Make sure that the char doesn't get sign-extended! */ + /* Make sure that the INT8 doesn't get sign-extended! */ switch (Display) { @@ -579,34 +593,39 @@ AcpiCmDumpBuffer ( default: - AcpiOsdPrintf ("%02X ", *((UINT8 *) &Buffer[i + j])); + AcpiOsPrintf ("%02X ", + *((UINT8 *) &Buffer[i + j])); j += 1; break; case DB_WORD_DISPLAY: - MOVE_UNALIGNED16_TO_32 (&Temp32, &Buffer[i + j]); - AcpiOsdPrintf ("%04X ", Temp32); + MOVE_UNALIGNED16_TO_32 (&Temp32, + &Buffer[i + j]); + AcpiOsPrintf ("%04X ", Temp32); j += 2; break; case DB_DWORD_DISPLAY: - MOVE_UNALIGNED32_TO_32 (&Temp32, &Buffer[i + j]); - AcpiOsdPrintf ("%08X ", Temp32); + MOVE_UNALIGNED32_TO_32 (&Temp32, + &Buffer[i + j]); + AcpiOsPrintf ("%08X ", Temp32); j += 4; break; case DB_QWORD_DISPLAY: - MOVE_UNALIGNED32_TO_32 (&Temp32, &Buffer[i + j]); - AcpiOsdPrintf ("%08X", Temp32); + MOVE_UNALIGNED32_TO_32 (&Temp32, + &Buffer[i + j]); + AcpiOsPrintf ("%08X", Temp32); - MOVE_UNALIGNED32_TO_32 (&Temp32, &Buffer[i + j + 4]); - AcpiOsdPrintf ("%08X ", Temp32); + MOVE_UNALIGNED32_TO_32 (&Temp32, + &Buffer[i + j + 4]); + AcpiOsPrintf ("%08X ", Temp32); j += 8; break; } @@ -622,7 +641,7 @@ AcpiCmDumpBuffer ( { if (i + j >= Count) { - AcpiOsdPrintf ("\n"); + AcpiOsPrintf ("\n"); return; } @@ -631,17 +650,17 @@ AcpiCmDumpBuffer ( (BufChar > 0x2F && BufChar < 0x61) || (BufChar > 0x60 && BufChar < 0x7F)) { - AcpiOsdPrintf ("%c", BufChar); + AcpiOsPrintf ("%c", BufChar); } else { - AcpiOsdPrintf ("."); + AcpiOsPrintf ("."); } } /* Done with that line. */ - AcpiOsdPrintf ("\n"); + AcpiOsPrintf ("\n"); i += 16; }