summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2016-03-10 10:20:07 -0800
committerRobert Moore <Robert.Moore@intel.com>2016-03-10 10:20:07 -0800
commita240cbb93647bddf525b3daf6e9d31b8b9bca34e (patch)
treed09a75b237d71e9e4d9364fc7129424e0e1e74ad /source
parentb8ea82d165740cdc56cec294dedda71d10710119 (diff)
downloadacpica-a240cbb93647bddf525b3daf6e9d31b8b9bca34e.tar.gz
All: const keyword changes across the ACPICA source
Integrated most changes proposed by NetBSD. From joerg@NetBSD.org (Joerg Sonnenberger) ACPICA BZ 732.
Diffstat (limited to 'source')
-rw-r--r--source/components/debugger/dbinput.c11
-rw-r--r--source/components/debugger/dbutils.c8
-rw-r--r--source/components/disassembler/dmopcode.c4
-rw-r--r--source/components/disassembler/dmresrc.c8
-rw-r--r--source/components/disassembler/dmresrcl.c6
-rw-r--r--source/components/events/evregion.c2
-rw-r--r--source/components/executer/exdump.c23
-rw-r--r--source/components/hardware/hwxface.c3
-rw-r--r--source/components/namespace/nsaccess.c2
-rw-r--r--source/components/namespace/nsdump.c9
-rw-r--r--source/components/parser/psopinfo.c2
-rw-r--r--source/components/resources/rsdump.c44
-rw-r--r--source/components/resources/rsutils.c2
-rw-r--r--source/components/tables/tbfadt.c8
-rw-r--r--source/components/utilities/utdebug.c40
-rw-r--r--source/components/utilities/uteval.c4
-rw-r--r--source/components/utilities/utglobal.c6
-rw-r--r--source/components/utilities/utmisc.c2
-rw-r--r--source/components/utilities/utprint.c6
-rw-r--r--source/components/utilities/uttrack.c2
-rw-r--r--source/include/acdebug.h4
-rw-r--r--source/include/acdisasm.h10
-rw-r--r--source/include/acglobal.h2
-rw-r--r--source/include/acinterp.h2
-rw-r--r--source/include/acnamesp.h4
-rw-r--r--source/include/acparser.h2
-rw-r--r--source/include/acresrc.h4
-rw-r--r--source/include/acstruct.h2
-rw-r--r--source/include/actypes.h4
-rw-r--r--source/include/acutils.h12
30 files changed, 115 insertions, 123 deletions
diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c
index 976e91675..7a31c58fa 100644
--- a/source/components/debugger/dbinput.c
+++ b/source/components/debugger/dbinput.c
@@ -141,7 +141,7 @@ AcpiDbSingleThread (
static void
AcpiDbDisplayCommandInfo (
- char *Command,
+ const char *Command,
BOOLEAN DisplayAll);
static void
@@ -150,7 +150,7 @@ AcpiDbDisplayHelp (
static BOOLEAN
AcpiDbMatchCommandHelp (
- char *Command,
+ const char *Command,
const ACPI_DB_COMMAND_HELP *Help);
@@ -430,7 +430,7 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] =
static BOOLEAN
AcpiDbMatchCommandHelp (
- char *Command,
+ const char *Command,
const ACPI_DB_COMMAND_HELP *Help)
{
char *Invocation = Help->Invocation;
@@ -492,7 +492,7 @@ AcpiDbMatchCommandHelp (
static void
AcpiDbDisplayCommandInfo (
- char *Command,
+ const char *Command,
BOOLEAN DisplayAll)
{
const ACPI_DB_COMMAND_HELP *Next;
@@ -792,7 +792,8 @@ AcpiDbMatchCommand (
for (i = CMD_FIRST_VALID; AcpiGbl_DbCommands[i].Name; i++)
{
- if (strstr (AcpiGbl_DbCommands[i].Name, UserCommand) ==
+ if (strstr (
+ ACPI_CAST_PTR (char, AcpiGbl_DbCommands[i].Name), UserCommand) ==
AcpiGbl_DbCommands[i].Name)
{
return (i);
diff --git a/source/components/debugger/dbutils.c b/source/components/debugger/dbutils.c
index 751ff430e..1129bbf83 100644
--- a/source/components/debugger/dbutils.c
+++ b/source/components/debugger/dbutils.c
@@ -135,8 +135,6 @@ AcpiDbDumpBuffer (
UINT32 Address);
#endif
-static char *Gbl_HexToAscii = "0123456789ABCDEF";
-
/*******************************************************************************
*
@@ -166,7 +164,9 @@ AcpiDbMatchArgument (
for (i = 0; Arguments[i].Name; i++)
{
- if (strstr (Arguments[i].Name, UserArgument) == Arguments[i].Name)
+ if (strstr (
+ ACPI_CAST_PTR (char, Arguments[i].Name),
+ ACPI_CAST_PTR (char, UserArgument)) == Arguments[i].Name)
{
return (i);
}
@@ -458,7 +458,7 @@ AcpiDbUint32ToHexString (
for (i = 7; i >= 0; i--)
{
- Buffer[i] = Gbl_HexToAscii [Value & 0x0F];
+ Buffer[i] = AcpiGbl_UpperHexDigits [Value & 0x0F];
Value = Value >> 4;
}
}
diff --git a/source/components/disassembler/dmopcode.c b/source/components/disassembler/dmopcode.c
index 45b9f7d02..16c0e5b10 100644
--- a/source/components/disassembler/dmopcode.c
+++ b/source/components/disassembler/dmopcode.c
@@ -718,8 +718,8 @@ AcpiDmMatchKeyword (
}
else
{
- AcpiOsPrintf ("%s", ACPI_CAST_PTR (char,
- AcpiGbl_MatchOps[(ACPI_SIZE) Op->Common.Value.Integer]));
+ AcpiOsPrintf ("%s",
+ AcpiGbl_MatchOps[(ACPI_SIZE) Op->Common.Value.Integer]);
}
}
diff --git a/source/components/disassembler/dmresrc.c b/source/components/disassembler/dmresrc.c
index 8788bebfe..79802569d 100644
--- a/source/components/disassembler/dmresrc.c
+++ b/source/components/disassembler/dmresrc.c
@@ -217,7 +217,7 @@ AcpiDmDescriptorName (
void
AcpiDmDumpInteger8 (
UINT8 Value,
- char *Name)
+ const char *Name)
{
AcpiOsPrintf ("0x%2.2X, // %s\n", Value, Name);
}
@@ -225,7 +225,7 @@ AcpiDmDumpInteger8 (
void
AcpiDmDumpInteger16 (
UINT16 Value,
- char *Name)
+ const char *Name)
{
AcpiOsPrintf ("0x%4.4X, // %s\n", Value, Name);
}
@@ -233,7 +233,7 @@ AcpiDmDumpInteger16 (
void
AcpiDmDumpInteger32 (
UINT32 Value,
- char *Name)
+ const char *Name)
{
AcpiOsPrintf ("0x%8.8X, // %s\n", Value, Name);
}
@@ -241,7 +241,7 @@ AcpiDmDumpInteger32 (
void
AcpiDmDumpInteger64 (
UINT64 Value,
- char *Name)
+ const char *Name)
{
AcpiOsPrintf ("0x%8.8X%8.8X, // %s\n", ACPI_FORMAT_UINT64 (Value), Name);
}
diff --git a/source/components/disassembler/dmresrcl.c b/source/components/disassembler/dmresrcl.c
index dd0cea639..8e71a6754 100644
--- a/source/components/disassembler/dmresrcl.c
+++ b/source/components/disassembler/dmresrcl.c
@@ -124,7 +124,7 @@
/* Common names for address and memory descriptors */
-static char *AcpiDmAddressNames[] =
+static const char *AcpiDmAddressNames[] =
{
"Granularity",
"Range Minimum",
@@ -133,7 +133,7 @@ static char *AcpiDmAddressNames[] =
"Length"
};
-static char *AcpiDmMemoryNames[] =
+static const char *AcpiDmMemoryNames[] =
{
"Range Minimum",
"Range Maximum",
@@ -1100,7 +1100,7 @@ AcpiDmInterruptDescriptor (
void
AcpiDmVendorCommon (
- char *Name,
+ const char *Name,
UINT8 *ByteData,
UINT32 Length,
UINT32 Level)
diff --git a/source/components/events/evregion.c b/source/components/events/evregion.c
index 9e1aa1c98..27764f303 100644
--- a/source/components/events/evregion.c
+++ b/source/components/events/evregion.c
@@ -637,7 +637,7 @@ void
AcpiEvAssociateRegMethod (
ACPI_OPERAND_OBJECT *RegionObj)
{
- ACPI_NAME *RegNamePtr = (ACPI_NAME *) METHOD_NAME__REG;
+ const ACPI_NAME *RegNamePtr = ACPI_CAST_PTR (ACPI_NAME, METHOD_NAME__REG);
ACPI_NAMESPACE_NODE *MethodNode;
ACPI_NAMESPACE_NODE *Node;
ACPI_OPERAND_OBJECT *RegionObj2;
diff --git a/source/components/executer/exdump.c b/source/components/executer/exdump.c
index a03a4393b..d0db3a6a7 100644
--- a/source/components/executer/exdump.c
+++ b/source/components/executer/exdump.c
@@ -132,13 +132,13 @@
static void
AcpiExOutString (
- char *Title,
- char *Value);
+ const char *Title,
+ const char *Value);
static void
AcpiExOutPointer (
- char *Title,
- void *Value);
+ const char *Title,
+ const void *Value);
static void
AcpiExDumpObject (
@@ -452,8 +452,7 @@ AcpiExDumpObject (
ACPI_EXDUMP_INFO *Info)
{
UINT8 *Target;
- char *Name;
- const char *ReferenceName;
+ const char *Name;
UINT8 Count;
ACPI_OPERAND_OBJECT *Start;
ACPI_OPERAND_OBJECT *Data = NULL;
@@ -544,9 +543,7 @@ AcpiExDumpObject (
case ACPI_EXD_REFERENCE:
- ReferenceName = AcpiUtGetReferenceName (ObjDesc);
- AcpiExOutString (
- "Class Name", ACPI_CAST_PTR (char, ReferenceName));
+ AcpiExOutString ("Class Name", AcpiUtGetReferenceName (ObjDesc));
AcpiExDumpReferenceObj (ObjDesc);
break;
@@ -1043,16 +1040,16 @@ AcpiExDumpOperands (
static void
AcpiExOutString (
- char *Title,
- char *Value)
+ const char *Title,
+ const char *Value)
{
AcpiOsPrintf ("%20s : %s\n", Title, Value);
}
static void
AcpiExOutPointer (
- char *Title,
- void *Value)
+ const char *Title,
+ const void *Value)
{
AcpiOsPrintf ("%20s : %p\n", Title, Value);
}
diff --git a/source/components/hardware/hwxface.c b/source/components/hardware/hwxface.c
index 2fbc366dd..acf3709a1 100644
--- a/source/components/hardware/hwxface.c
+++ b/source/components/hardware/hwxface.c
@@ -637,8 +637,7 @@ AcpiGetSleepTypeData (
* Evaluate the \_Sx namespace object containing the register values
* for this state
*/
- Info->RelativePathname = ACPI_CAST_PTR (char,
- AcpiGbl_SleepStateNames[SleepState]);
+ Info->RelativePathname = AcpiGbl_SleepStateNames[SleepState];
Status = AcpiNsEvaluate (Info);
if (ACPI_FAILURE (Status))
diff --git a/source/components/namespace/nsaccess.c b/source/components/namespace/nsaccess.c
index 175a92c58..9ac25b19a 100644
--- a/source/components/namespace/nsaccess.c
+++ b/source/components/namespace/nsaccess.c
@@ -188,7 +188,7 @@ AcpiNsRootInitialize (
continue;
}
- Status = AcpiNsLookup (NULL, InitVal->Name, InitVal->Type,
+ Status = AcpiNsLookup (NULL, (char *) InitVal->Name, InitVal->Type,
ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH,
NULL, &NewNode);
if (ACPI_FAILURE (Status))
diff --git a/source/components/namespace/nsdump.c b/source/components/namespace/nsdump.c
index bce5880f9..ff84b3b7f 100644
--- a/source/components/namespace/nsdump.c
+++ b/source/components/namespace/nsdump.c
@@ -172,7 +172,7 @@ AcpiNsGetMaxDepth (
void
AcpiNsPrintPathname (
UINT32 NumSegments,
- char *Pathname)
+ const char *Pathname)
{
UINT32 i;
@@ -212,6 +212,9 @@ AcpiNsPrintPathname (
}
+#ifdef ACPI_OBSOLETE_FUNCTIONS
+/* Not used at this time, perhaps later */
+
/*******************************************************************************
*
* FUNCTION: AcpiNsDumpPathname
@@ -231,7 +234,7 @@ AcpiNsPrintPathname (
void
AcpiNsDumpPathname (
ACPI_HANDLE Handle,
- char *Msg,
+ const char *Msg,
UINT32 Level,
UINT32 Component)
{
@@ -252,7 +255,7 @@ AcpiNsDumpPathname (
AcpiOsPrintf ("\n");
return_VOID;
}
-
+#endif
/*******************************************************************************
*
diff --git a/source/components/parser/psopinfo.c b/source/components/parser/psopinfo.c
index 6556d05f6..fcc0375ac 100644
--- a/source/components/parser/psopinfo.c
+++ b/source/components/parser/psopinfo.c
@@ -237,7 +237,7 @@ AcpiPsGetOpcodeInfo (
*
******************************************************************************/
-char *
+const char *
AcpiPsGetOpcodeName (
UINT16 Opcode)
{
diff --git a/source/components/resources/rsdump.c b/source/components/resources/rsdump.c
index 73c4cdac1..3a67505dd 100644
--- a/source/components/resources/rsdump.c
+++ b/source/components/resources/rsdump.c
@@ -128,32 +128,32 @@
static void
AcpiRsOutString (
- char *Title,
- char *Value);
+ const char *Title,
+ const char *Value);
static void
AcpiRsOutInteger8 (
- char *Title,
+ const char *Title,
UINT8 Value);
static void
AcpiRsOutInteger16 (
- char *Title,
+ const char *Title,
UINT16 Value);
static void
AcpiRsOutInteger32 (
- char *Title,
+ const char *Title,
UINT32 Value);
static void
AcpiRsOutInteger64 (
- char *Title,
+ const char *Title,
UINT64 Value);
static void
AcpiRsOutTitle (
- char *Title);
+ const char *Title);
static void
AcpiRsDumpByteList (
@@ -335,8 +335,8 @@ AcpiRsDumpDescriptor (
{
UINT8 *Target = NULL;
UINT8 *PreviousTarget;
- char *Name;
- UINT8 Count;
+ const char *Name;
+ UINT8 Count;
/* First table entry must contain the table length (# of table entries) */
@@ -379,8 +379,7 @@ AcpiRsDumpDescriptor (
if (Table->Pointer)
{
- AcpiRsOutString (Name, ACPI_CAST_PTR (char,
- Table->Pointer [*Target]));
+ AcpiRsOutString (Name, Table->Pointer [*Target]);
}
else
{
@@ -407,20 +406,17 @@ AcpiRsDumpDescriptor (
case ACPI_RSD_1BITFLAG:
- AcpiRsOutString (Name, ACPI_CAST_PTR (char,
- Table->Pointer [*Target & 0x01]));
+ AcpiRsOutString (Name, Table->Pointer [*Target & 0x01]);
break;
case ACPI_RSD_2BITFLAG:
- AcpiRsOutString (Name, ACPI_CAST_PTR (char,
- Table->Pointer [*Target & 0x03]));
+ AcpiRsOutString (Name, Table->Pointer [*Target & 0x03]);
break;
case ACPI_RSD_3BITFLAG:
- AcpiRsOutString (Name, ACPI_CAST_PTR (char,
- Table->Pointer [*Target & 0x07]));
+ AcpiRsOutString (Name, Table->Pointer [*Target & 0x07]);
break;
case ACPI_RSD_SHORTLIST:
@@ -614,8 +610,8 @@ AcpiRsDumpAddressCommon (
static void
AcpiRsOutString (
- char *Title,
- char *Value)
+ const char *Title,
+ const char *Value)
{
AcpiOsPrintf ("%27s : %s", Title, Value);
@@ -628,7 +624,7 @@ AcpiRsOutString (
static void
AcpiRsOutInteger8 (
- char *Title,
+ const char *Title,
UINT8 Value)
{
AcpiOsPrintf ("%27s : %2.2X\n", Title, Value);
@@ -636,7 +632,7 @@ AcpiRsOutInteger8 (
static void
AcpiRsOutInteger16 (
- char *Title,
+ const char *Title,
UINT16 Value)
{
@@ -645,7 +641,7 @@ AcpiRsOutInteger16 (
static void
AcpiRsOutInteger32 (
- char *Title,
+ const char *Title,
UINT32 Value)
{
@@ -654,7 +650,7 @@ AcpiRsOutInteger32 (
static void
AcpiRsOutInteger64 (
- char *Title,
+ const char *Title,
UINT64 Value)
{
@@ -664,7 +660,7 @@ AcpiRsOutInteger64 (
static void
AcpiRsOutTitle (
- char *Title)
+ const char *Title)
{
AcpiOsPrintf ("%27s : ", Title);
diff --git a/source/components/resources/rsutils.c b/source/components/resources/rsutils.c
index fdb08b50f..3c8c633ba 100644
--- a/source/components/resources/rsutils.c
+++ b/source/components/resources/rsutils.c
@@ -812,7 +812,7 @@ AcpiRsGetAeiMethodData (
ACPI_STATUS
AcpiRsGetMethodData (
ACPI_HANDLE Handle,
- char *Path,
+ const char *Path,
ACPI_BUFFER *RetBuffer)
{
ACPI_OPERAND_OBJECT *ObjDesc;
diff --git a/source/components/tables/tbfadt.c b/source/components/tables/tbfadt.c
index 533890c42..413b2fd6b 100644
--- a/source/components/tables/tbfadt.c
+++ b/source/components/tables/tbfadt.c
@@ -128,7 +128,7 @@ AcpiTbInitGenericAddress (
UINT8 SpaceId,
UINT8 ByteWidth,
UINT64 Address,
- char *RegisterName,
+ const char *RegisterName,
UINT8 Flags);
static void
@@ -150,7 +150,7 @@ AcpiTbSelectAddress (
typedef struct acpi_fadt_info
{
- char *Name;
+ const char *Name;
UINT16 Address64;
UINT16 Address32;
UINT16 Length;
@@ -284,7 +284,7 @@ AcpiTbInitGenericAddress (
UINT8 SpaceId,
UINT8 ByteWidth,
UINT64 Address,
- char *RegisterName,
+ const char *RegisterName,
UINT8 Flags)
{
UINT8 BitWidth;
@@ -579,7 +579,7 @@ static void
AcpiTbConvertFadt (
void)
{
- char *Name;
+ const char *Name;
ACPI_GENERIC_ADDRESS *Address64;
UINT32 Address32;
UINT8 Length;
diff --git a/source/components/utilities/utdebug.c b/source/components/utilities/utdebug.c
index e50f838b2..b68d36e10 100644
--- a/source/components/utilities/utdebug.c
+++ b/source/components/utilities/utdebug.c
@@ -125,15 +125,9 @@
#ifdef ACPI_DEBUG_OUTPUT
-static ACPI_THREAD_ID AcpiGbl_PrevThreadId = (ACPI_THREAD_ID) 0xFFFFFFFF;
-static char *AcpiGbl_FnEntryStr = "----Entry";
-static char *AcpiGbl_FnExitStr = "----Exit-";
-
-/* Local prototypes */
-
-static const char *
-AcpiUtTrimFunctionName (
- const char *FunctionName);
+static ACPI_THREAD_ID AcpiGbl_PreviousThreadId = (ACPI_THREAD_ID) 0xFFFFFFFF;
+static const char *AcpiGbl_FunctionEntryPrefix = "----Entry";
+static const char *AcpiGbl_FunctionExitPrefix = "----Exit-";
/*******************************************************************************
@@ -273,16 +267,16 @@ AcpiDebugPrint (
* Thread tracking and context switch notification
*/
ThreadId = AcpiOsGetThreadId ();
- if (ThreadId != AcpiGbl_PrevThreadId)
+ if (ThreadId != AcpiGbl_PreviousThreadId)
{
if (ACPI_LV_THREADS & AcpiDbgLevel)
{
AcpiOsPrintf (
"\n**** Context Switch from TID %u to TID %u ****\n\n",
- (UINT32) AcpiGbl_PrevThreadId, (UINT32) ThreadId);
+ (UINT32) AcpiGbl_PreviousThreadId, (UINT32) ThreadId);
}
- AcpiGbl_PrevThreadId = ThreadId;
+ AcpiGbl_PreviousThreadId = ThreadId;
AcpiGbl_NestingLevel = 0;
}
@@ -397,7 +391,7 @@ AcpiUtTrace (
{
AcpiDebugPrint (ACPI_LV_FUNCTIONS,
LineNumber, FunctionName, ModuleName, ComponentId,
- "%s\n", AcpiGbl_FnEntryStr);
+ "%s\n", AcpiGbl_FunctionEntryPrefix);
}
}
@@ -427,7 +421,7 @@ AcpiUtTracePtr (
const char *FunctionName,
const char *ModuleName,
UINT32 ComponentId,
- void *Pointer)
+ const void *Pointer)
{
AcpiGbl_NestingLevel++;
@@ -439,7 +433,7 @@ AcpiUtTracePtr (
{
AcpiDebugPrint (ACPI_LV_FUNCTIONS,
LineNumber, FunctionName, ModuleName, ComponentId,
- "%s %p\n", AcpiGbl_FnEntryStr, Pointer);
+ "%s %p\n", AcpiGbl_FunctionEntryPrefix, Pointer);
}
}
@@ -467,7 +461,7 @@ AcpiUtTraceStr (
const char *FunctionName,
const char *ModuleName,
UINT32 ComponentId,
- char *String)
+ const char *String)
{
AcpiGbl_NestingLevel++;
@@ -479,7 +473,7 @@ AcpiUtTraceStr (
{
AcpiDebugPrint (ACPI_LV_FUNCTIONS,
LineNumber, FunctionName, ModuleName, ComponentId,
- "%s %s\n", AcpiGbl_FnEntryStr, String);
+ "%s %s\n", AcpiGbl_FunctionEntryPrefix, String);
}
}
@@ -519,7 +513,7 @@ AcpiUtTraceU32 (
{
AcpiDebugPrint (ACPI_LV_FUNCTIONS,
LineNumber, FunctionName, ModuleName, ComponentId,
- "%s %08X\n", AcpiGbl_FnEntryStr, Integer);
+ "%s %08X\n", AcpiGbl_FunctionEntryPrefix, Integer);
}
}
@@ -554,7 +548,7 @@ AcpiUtExit (
{
AcpiDebugPrint (ACPI_LV_FUNCTIONS,
LineNumber, FunctionName, ModuleName, ComponentId,
- "%s\n", AcpiGbl_FnExitStr);
+ "%s\n", AcpiGbl_FunctionExitPrefix);
}
if (AcpiGbl_NestingLevel)
@@ -600,14 +594,14 @@ AcpiUtStatusExit (
{
AcpiDebugPrint (ACPI_LV_FUNCTIONS,
LineNumber, FunctionName, ModuleName, ComponentId,
- "%s %s\n", AcpiGbl_FnExitStr,
+ "%s %s\n", AcpiGbl_FunctionExitPrefix,
AcpiFormatException (Status));
}
else
{
AcpiDebugPrint (ACPI_LV_FUNCTIONS,
LineNumber, FunctionName, ModuleName, ComponentId,
- "%s ****Exception****: %s\n", AcpiGbl_FnExitStr,
+ "%s ****Exception****: %s\n", AcpiGbl_FunctionExitPrefix,
AcpiFormatException (Status));
}
}
@@ -653,7 +647,7 @@ AcpiUtValueExit (
{
AcpiDebugPrint (ACPI_LV_FUNCTIONS,
LineNumber, FunctionName, ModuleName, ComponentId,
- "%s %8.8X%8.8X\n", AcpiGbl_FnExitStr,
+ "%s %8.8X%8.8X\n", AcpiGbl_FunctionExitPrefix,
ACPI_FORMAT_UINT64 (Value));
}
@@ -698,7 +692,7 @@ AcpiUtPtrExit (
{
AcpiDebugPrint (ACPI_LV_FUNCTIONS,
LineNumber, FunctionName, ModuleName, ComponentId,
- "%s %p\n", AcpiGbl_FnExitStr, Ptr);
+ "%s %p\n", AcpiGbl_FunctionExitPrefix, Ptr);
}
if (AcpiGbl_NestingLevel)
diff --git a/source/components/utilities/uteval.c b/source/components/utilities/uteval.c
index 2028d83f9..ebe66e2e3 100644
--- a/source/components/utilities/uteval.c
+++ b/source/components/utilities/uteval.c
@@ -144,7 +144,7 @@
ACPI_STATUS
AcpiUtEvaluateObject (
ACPI_NAMESPACE_NODE *PrefixNode,
- char *Path,
+ const char *Path,
UINT32 ExpectedReturnBtypes,
ACPI_OPERAND_OBJECT **ReturnDesc)
{
@@ -291,7 +291,7 @@ Cleanup:
ACPI_STATUS
AcpiUtEvaluateNumericObject (
- char *ObjectName,
+ const char *ObjectName,
ACPI_NAMESPACE_NODE *DeviceNode,
UINT64 *Value)
{
diff --git a/source/components/utilities/utglobal.c b/source/components/utilities/utglobal.c
index 578ce2c61..fa29f47fa 100644
--- a/source/components/utilities/utglobal.c
+++ b/source/components/utilities/utglobal.c
@@ -159,6 +159,12 @@ const char *AcpiGbl_HighestDstateNames[ACPI_NUM_SxD_METHODS] =
};
+/* Hex-to-ascii */
+
+const char AcpiGbl_LowerHexDigits[] = "0123456789abcdef";
+const char AcpiGbl_UpperHexDigits[] = "0123456789ABCDEF";
+
+
/*******************************************************************************
*
* Namespace globals
diff --git a/source/components/utilities/utmisc.c b/source/components/utilities/utmisc.c
index fb1d08c00..41f2c72b7 100644
--- a/source/components/utilities/utmisc.c
+++ b/source/components/utilities/utmisc.c
@@ -473,7 +473,7 @@ void
AcpiUtDisplayInitPathname (
UINT8 Type,
ACPI_NAMESPACE_NODE *ObjHandle,
- char *Path)
+ const char *Path)
{
ACPI_STATUS Status;
ACPI_BUFFER Buffer;
diff --git a/source/components/utilities/utprint.c b/source/components/utilities/utprint.c
index 848a46dd9..5ca859ec4 100644
--- a/source/components/utilities/utprint.c
+++ b/source/components/utilities/utprint.c
@@ -160,12 +160,6 @@ AcpiUtPutNumber (
BOOLEAN Upper);
-/* Module globals */
-
-static const char AcpiGbl_LowerHexDigits[] = "0123456789abcdef";
-static const char AcpiGbl_UpperHexDigits[] = "0123456789ABCDEF";
-
-
/*******************************************************************************
*
* FUNCTION: AcpiUtBoundStringLength
diff --git a/source/components/utilities/uttrack.c b/source/components/utilities/uttrack.c
index 7808ed53c..cd3495fb2 100644
--- a/source/components/utilities/uttrack.c
+++ b/source/components/utilities/uttrack.c
@@ -172,7 +172,7 @@ AcpiUtRemoveAllocation (
ACPI_STATUS
AcpiUtCreateList (
- char *ListName,
+ const char *ListName,
UINT16 ObjectSize,
ACPI_MEMORY_LIST **ReturnCache)
{
diff --git a/source/include/acdebug.h b/source/include/acdebug.h
index b2083f098..a8c95ad55 100644
--- a/source/include/acdebug.h
+++ b/source/include/acdebug.h
@@ -127,7 +127,7 @@
typedef struct acpi_db_command_info
{
- char *Name; /* Command Name */
+ const char *Name; /* Command Name */
UINT8 MinArgs; /* Minimum arguments required */
} ACPI_DB_COMMAND_INFO;
@@ -142,7 +142,7 @@ typedef struct acpi_db_command_help
typedef struct acpi_db_argument_info
{
- char *Name; /* Argument Name */
+ const char *Name; /* Argument Name */
} ACPI_DB_ARGUMENT_INFO;
diff --git a/source/include/acdisasm.h b/source/include/acdisasm.h
index f96237056..b62568dc5 100644
--- a/source/include/acdisasm.h
+++ b/source/include/acdisasm.h
@@ -881,22 +881,22 @@ AcpiDmGetExternalsFromFile (
void
AcpiDmDumpInteger8 (
UINT8 Value,
- char *Name);
+ const char *Name);
void
AcpiDmDumpInteger16 (
UINT16 Value,
- char *Name);
+ const char *Name);
void
AcpiDmDumpInteger32 (
UINT32 Value,
- char *Name);
+ const char *Name);
void
AcpiDmDumpInteger64 (
UINT64 Value,
- char *Name);
+ const char *Name);
void
AcpiDmResourceTemplate (
@@ -1008,7 +1008,7 @@ AcpiDmSerialBusDescriptor (
void
AcpiDmVendorCommon (
- char *Name,
+ const char *Name,
UINT8 *ByteData,
UINT32 Length,
UINT32 Level);
diff --git a/source/include/acglobal.h b/source/include/acglobal.h
index ccc49be6c..67a167216 100644
--- a/source/include/acglobal.h
+++ b/source/include/acglobal.h
@@ -261,6 +261,8 @@ extern const char *AcpiGbl_SleepStateNames[ACPI_S_STATE_COU
extern const char *AcpiGbl_LowestDstateNames[ACPI_NUM_SxW_METHODS];
extern const char *AcpiGbl_HighestDstateNames[ACPI_NUM_SxD_METHODS];
extern const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS];
+extern const char AcpiGbl_LowerHexDigits[];
+extern const char AcpiGbl_UpperHexDigits[];
extern const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[AML_NUM_OPCODES];
diff --git a/source/include/acinterp.h b/source/include/acinterp.h
index 4029b1485..3abfdb05d 100644
--- a/source/include/acinterp.h
+++ b/source/include/acinterp.h
@@ -141,7 +141,7 @@ typedef const struct acpi_exdump_info
{
UINT8 Opcode;
UINT8 Offset;
- char *Name;
+ const char *Name;
} ACPI_EXDUMP_INFO;
diff --git a/source/include/acnamesp.h b/source/include/acnamesp.h
index 7141d51dd..2c4348699 100644
--- a/source/include/acnamesp.h
+++ b/source/include/acnamesp.h
@@ -330,14 +330,14 @@ AcpiNsDumpEntry (
void
AcpiNsDumpPathname (
ACPI_HANDLE Handle,
- char *Msg,
+ const char *Msg,
UINT32 Level,
UINT32 Component);
void
AcpiNsPrintPathname (
UINT32 NumSegments,
- char *Pathname);
+ const char *Pathname);
ACPI_STATUS
AcpiNsDumpOneObject (
diff --git a/source/include/acparser.h b/source/include/acparser.h
index 09b6bfda6..406b0f37c 100644
--- a/source/include/acparser.h
+++ b/source/include/acparser.h
@@ -243,7 +243,7 @@ const ACPI_OPCODE_INFO *
AcpiPsGetOpcodeInfo (
UINT16 Opcode);
-char *
+const char *
AcpiPsGetOpcodeName (
UINT16 Opcode);
diff --git a/source/include/acresrc.h b/source/include/acresrc.h
index 7110cb963..5c638548f 100644
--- a/source/include/acresrc.h
+++ b/source/include/acresrc.h
@@ -203,7 +203,7 @@ typedef const struct acpi_rsdump_info
{
UINT8 Opcode;
UINT8 Offset;
- char *Name;
+ const char *Name;
const char **Pointer;
} ACPI_RSDUMP_INFO;
@@ -300,7 +300,7 @@ AcpiRsGetPrsMethodData (
ACPI_STATUS
AcpiRsGetMethodData (
ACPI_HANDLE Handle,
- char *Path,
+ const char *Path,
ACPI_BUFFER *RetBuffer);
ACPI_STATUS
diff --git a/source/include/acstruct.h b/source/include/acstruct.h
index a9624d911..e823eae00 100644
--- a/source/include/acstruct.h
+++ b/source/include/acstruct.h
@@ -274,7 +274,7 @@ typedef struct acpi_evaluate_info
/* The first 3 elements are passed by the caller to AcpiNsEvaluate */
ACPI_NAMESPACE_NODE *PrefixNode; /* Input: starting node */
- char *RelativePathname; /* Input: path relative to PrefixNode */
+ const char *RelativePathname; /* Input: path relative to PrefixNode */
ACPI_OPERAND_OBJECT **Parameters; /* Input: argument list */
ACPI_NAMESPACE_NODE *Node; /* Resolved node (PrefixNode:RelativePathname) */
diff --git a/source/include/actypes.h b/source/include/actypes.h
index 5f85dd8ff..039d71a5a 100644
--- a/source/include/actypes.h
+++ b/source/include/actypes.h
@@ -1106,7 +1106,7 @@ typedef struct acpi_buffer
*/
typedef struct acpi_predefined_names
{
- char *Name;
+ const char *Name;
UINT8 Type;
char *Val;
@@ -1397,7 +1397,7 @@ typedef struct acpi_mem_space_context
*/
typedef struct acpi_memory_list
{
- char *ListName;
+ const char *ListName;
void *ListHead;
UINT16 ObjectSize;
UINT16 MaxDepth;
diff --git a/source/include/acutils.h b/source/include/acutils.h
index 86962ce8e..90069f53f 100644
--- a/source/include/acutils.h
+++ b/source/include/acutils.h
@@ -419,7 +419,7 @@ AcpiUtTracePtr (
const char *FunctionName,
const char *ModuleName,
UINT32 ComponentId,
- void *Pointer);
+ const void *Pointer);
void
AcpiUtTraceU32 (
@@ -435,7 +435,7 @@ AcpiUtTraceStr (
const char *FunctionName,
const char *ModuleName,
UINT32 ComponentId,
- char *String);
+ const char *String);
void
AcpiUtExit (
@@ -538,13 +538,13 @@ AcpiUtDeleteInternalObjectList (
ACPI_STATUS
AcpiUtEvaluateObject (
ACPI_NAMESPACE_NODE *PrefixNode,
- char *Path,
+ const char *Path,
UINT32 ExpectedReturnBtypes,
ACPI_OPERAND_OBJECT **ReturnDesc);
ACPI_STATUS
AcpiUtEvaluateNumericObject (
- char *ObjectName,
+ const char *ObjectName,
ACPI_NAMESPACE_NODE *DeviceNode,
UINT64 *Value);
@@ -835,7 +835,7 @@ void
AcpiUtDisplayInitPathname (
UINT8 Type,
ACPI_NAMESPACE_NODE *ObjHandle,
- char *Path);
+ const char *Path);
#endif
@@ -1012,7 +1012,7 @@ AcpiUtDumpAllocations (
ACPI_STATUS
AcpiUtCreateList (
- char *ListName,
+ const char *ListName,
UINT16 ObjectSize,
ACPI_MEMORY_LIST **ReturnCache);