diff options
author | Jeshua Smith <jeshuas@nvidia.com> | 2024-05-03 14:25:37 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-07-01 09:40:09 +0000 |
commit | 469d09d6b25f4ac83dd4ed511db45795aa09d45b (patch) | |
tree | 17f11e52a80415fd829b0ae032848cb46795c18f /DynamicTablesPkg/Library | |
parent | 8c09d862bfb034e00b6b3bc37fe37243c866dd3a (diff) | |
download | edk2-469d09d6b25f4ac83dd4ed511db45795aa09d45b.zip edk2-469d09d6b25f4ac83dd4ed511db45795aa09d45b.tar.gz edk2-469d09d6b25f4ac83dd4ed511db45795aa09d45b.tar.bz2 |
DynamicTablesPkg: AmlLib CONST cleanup
Several input strings to AmlLib APIs are treated
as CONST but were missing the CONST keyword,
requiring their callers to create unnecessary r/w
copies of r/o input strings. This change properly
marks these input strings as CONST.
Signed-off-by: Jeshua Smith <jeshuas@nvidia.com>
Reviewed-by: Jeff Brasen <jbrasen@nvidia.com>
Diffstat (limited to 'DynamicTablesPkg/Library')
3 files changed, 8 insertions, 8 deletions
diff --git a/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApi.c b/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApi.c index 9f162ab..41643d5 100644 --- a/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApi.c +++ b/DynamicTablesPkg/Library/Common/AmlLib/Api/AmlApi.c @@ -40,7 +40,7 @@ EFI_STATUS EFIAPI
AmlDeviceOpUpdateName (
IN AML_OBJECT_NODE_HANDLE DeviceOpNode,
- IN CHAR8 *NewNameString
+ IN CONST CHAR8 *NewNameString
)
{
EFI_STATUS Status;
diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c index 89fa4e0..f433a46 100644 --- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c +++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c @@ -139,7 +139,7 @@ STATIC EFI_STATUS
EFIAPI
AmlCodeGenString (
- IN CHAR8 *String,
+ IN CONST CHAR8 *String,
OUT AML_OBJECT_NODE **NewObjectNode
)
{
@@ -664,7 +664,7 @@ EFI_STATUS EFIAPI
AmlCodeGenNameString (
IN CONST CHAR8 *NameString,
- IN CHAR8 *String,
+ IN CONST CHAR8 *String,
IN AML_NODE_HEADER *ParentNode OPTIONAL,
OUT AML_OBJECT_NODE **NewObjectNode OPTIONAL
)
@@ -2615,7 +2615,7 @@ AmlAddLpiState ( IN UINT64 Integer OPTIONAL,
IN EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE *ResidencyCounterRegister OPTIONAL,
IN EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE *UsageCounterRegister OPTIONAL,
- IN CHAR8 *StateName OPTIONAL,
+ IN CONST CHAR8 *StateName OPTIONAL,
IN AML_OBJECT_NODE_HANDLE LpiNode
)
{
@@ -3204,7 +3204,7 @@ error_handler: EFI_STATUS
EFIAPI
AmlAddNameIntegerPackage (
- IN CHAR8 *Name,
+ IN CONST CHAR8 *Name,
IN UINT64 Value,
IN AML_OBJECT_NODE_HANDLE PackageNode
)
@@ -3800,7 +3800,7 @@ error_handler: EFI_STATUS
EFIAPI
AmlAddNameStringToNamedPackage (
- IN CHAR8 *NameString,
+ IN CONST CHAR8 *NameString,
IN AML_OBJECT_NODE_HANDLE NamedNode
)
{
diff --git a/DynamicTablesPkg/Library/Common/AmlLib/NameSpace/AmlNameSpace.c b/DynamicTablesPkg/Library/Common/AmlLib/NameSpace/AmlNameSpace.c index 9104b78..e871afe 100644 --- a/DynamicTablesPkg/Library/Common/AmlLib/NameSpace/AmlNameSpace.c +++ b/DynamicTablesPkg/Library/Common/AmlLib/NameSpace/AmlNameSpace.c @@ -1234,7 +1234,7 @@ EFI_STATUS EFIAPI
AmlBuildAbsoluteAmlPath (
IN AML_NODE_HEADER *ReferenceNode,
- IN CHAR8 *AslPath,
+ IN CONST CHAR8 *AslPath,
IN OUT AML_STREAM *RawAmlAbsSearchPathBStream
)
{
@@ -1373,7 +1373,7 @@ EFI_STATUS EFIAPI
AmlFindNode (
IN AML_NODE_HEADER *ReferenceNode,
- IN CHAR8 *AslPath,
+ IN CONST CHAR8 *AslPath,
OUT AML_NODE_HEADER **OutNode
)
{
|