diff options
author | Sudeep Holla <sudeep.holla@arm.com> | 2024-10-23 13:40:54 +0100 |
---|---|---|
committer | Sami Mujawar <sami.mujawar@arm.com> | 2024-10-24 11:37:22 +0100 |
commit | 8af71632d6552e637a2ce29c579c70ccc562ba7b (patch) | |
tree | e0f6ed3619ffe060c13510b9ba4b3e193903aa8d /DynamicTablesPkg | |
parent | 9e56b4373bf45041ed95362424b446398e0a8dc5 (diff) | |
download | edk2-8af71632d6552e637a2ce29c579c70ccc562ba7b.tar.gz edk2-8af71632d6552e637a2ce29c579c70ccc562ba7b.tar.bz2 edk2-8af71632d6552e637a2ce29c579c70ccc562ba7b.zip |
DynamicTablesPkg: Drop the unnecessary comparision of UINT8 max value
Clang build breaks with the following error:
| DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c:1441:20:
| error: result of comparison of constant 256 with expression of type 'UINT8'
| (aka 'unsigned char') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
| 1441 | (AccessSize > 256)) ||
| | ~~~~~~~~~~ ^ ~~~
| 1 error generated.
AccessSize is UINT8 and the maximum value for UINT8 is 255, so the
comparision is unnecessary. Drop the check to fix the build.
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'DynamicTablesPkg')
-rw-r--r-- | DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c index 3db536dddf..bf0d7b0cca 100644 --- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c +++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c @@ -1437,9 +1437,7 @@ AmlCodeGenRdRegister ( // Cf. ACPI 6.4, s14.7 Referencing the PCC address space
// The AccessSize represents the Subspace Id for the PCC address space.
- if (((AddressSpace == EFI_ACPI_6_4_PLATFORM_COMMUNICATION_CHANNEL) &&
- (AccessSize > 256)) ||
- ((AddressSpace != EFI_ACPI_6_4_PLATFORM_COMMUNICATION_CHANNEL) &&
+ if (((AddressSpace != EFI_ACPI_6_4_PLATFORM_COMMUNICATION_CHANNEL) &&
(AccessSize > EFI_ACPI_6_4_QWORD)) ||
((NameOpNode == NULL) && (NewRdNode == NULL)))
{
|