Re: [edk2-devel] [PATCH v1 08/19] DynamicTablesPkg: Fix ACPI table rev field width

2019-08-23 Thread Alexei Fedorov
Reviewed-by: Alexei Fedorov 


Alexei


From: Sami Mujawar 
Sent: 23 August 2019 11:55
To: devel@edk2.groups.io 
Cc: Sami Mujawar ; Alexei Fedorov 
; leif.lindh...@linaro.org ; 
Matteo Carlini ; nd 
Subject: [PATCH v1 08/19] DynamicTablesPkg: Fix ACPI table rev field width

The VS2017 compiler reports 'warning C4244: '=': conversion from
'const UINT32' to 'UINT8', possible loss of data' when the ACPI
table revision field is being updated.

The width of the revision field in the EFI_ACPI_DESCRIPTION_HEADER
struct is 8-bit wide. Therefore, to fix the above warning make the
ACPI Table revision field usage 8-bit wide across Dynamic Tables
Framework.

Signed-off-by: Sami Mujawar 
---
 DynamicTablesPkg/Include/AcpiTableGenerator.h   | 4 ++--
 DynamicTablesPkg/Include/StandardNameSpaceObjects.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/DynamicTablesPkg/Include/AcpiTableGenerator.h 
b/DynamicTablesPkg/Include/AcpiTableGenerator.h
index 
7d6d3442276db7b4abaeb3b053ba489258adea0b..d7a1209c4d40c2e6ffb3dac786c276a30d70b6df
 100644
--- a/DynamicTablesPkg/Include/AcpiTableGenerator.h
+++ b/DynamicTablesPkg/Include/AcpiTableGenerator.h
@@ -284,10 +284,10 @@ typedef struct AcpiTableGenerator {
   UINT32 AcpiTableSignature;

   /// The ACPI table revision.
-  UINT32 AcpiTableRevision;
+  UINT8  AcpiTableRevision;

   /// The minimum supported ACPI table revision.
-  UINT32 MinAcpiTableRevision;
+  UINT8  MinAcpiTableRevision;

   /// The ACPI table creator ID.
   UINT32 CreatorId;
diff --git a/DynamicTablesPkg/Include/StandardNameSpaceObjects.h 
b/DynamicTablesPkg/Include/StandardNameSpaceObjects.h
index 
21bb7de4044ffd6f97156f761e30fc1790f11c0c..0ba6b163691ea127ae7a7d57fb5f9fdf84789338
 100644
--- a/DynamicTablesPkg/Include/StandardNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/StandardNameSpaceObjects.h
@@ -79,7 +79,7 @@ typedef struct CmAStdObjAcpiTableInfo {
   UINT32 AcpiTableSignature;

   /// The ACPI table revision
-  UINT32 AcpiTableRevision;
+  UINT8  AcpiTableRevision;

   /// The ACPI Table Generator ID
   ACPI_TABLE_GENERATOR_IDTableGeneratorId;
--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'


IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46294): https://edk2.groups.io/g/devel/message/46294
Mute This Topic: https://groups.io/mt/32999787/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH v1 08/19] DynamicTablesPkg: Fix ACPI table rev field width

2019-08-23 Thread Sami Mujawar
The VS2017 compiler reports 'warning C4244: '=': conversion from
'const UINT32' to 'UINT8', possible loss of data' when the ACPI
table revision field is being updated.

The width of the revision field in the EFI_ACPI_DESCRIPTION_HEADER
struct is 8-bit wide. Therefore, to fix the above warning make the
ACPI Table revision field usage 8-bit wide across Dynamic Tables
Framework.

Signed-off-by: Sami Mujawar 
---
 DynamicTablesPkg/Include/AcpiTableGenerator.h   | 4 ++--
 DynamicTablesPkg/Include/StandardNameSpaceObjects.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/DynamicTablesPkg/Include/AcpiTableGenerator.h 
b/DynamicTablesPkg/Include/AcpiTableGenerator.h
index 
7d6d3442276db7b4abaeb3b053ba489258adea0b..d7a1209c4d40c2e6ffb3dac786c276a30d70b6df
 100644
--- a/DynamicTablesPkg/Include/AcpiTableGenerator.h
+++ b/DynamicTablesPkg/Include/AcpiTableGenerator.h
@@ -284,10 +284,10 @@ typedef struct AcpiTableGenerator {
   UINT32 AcpiTableSignature;
 
   /// The ACPI table revision.
-  UINT32 AcpiTableRevision;
+  UINT8  AcpiTableRevision;
 
   /// The minimum supported ACPI table revision.
-  UINT32 MinAcpiTableRevision;
+  UINT8  MinAcpiTableRevision;
 
   /// The ACPI table creator ID.
   UINT32 CreatorId;
diff --git a/DynamicTablesPkg/Include/StandardNameSpaceObjects.h 
b/DynamicTablesPkg/Include/StandardNameSpaceObjects.h
index 
21bb7de4044ffd6f97156f761e30fc1790f11c0c..0ba6b163691ea127ae7a7d57fb5f9fdf84789338
 100644
--- a/DynamicTablesPkg/Include/StandardNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/StandardNameSpaceObjects.h
@@ -79,7 +79,7 @@ typedef struct CmAStdObjAcpiTableInfo {
   UINT32 AcpiTableSignature;
 
   /// The ACPI table revision
-  UINT32 AcpiTableRevision;
+  UINT8  AcpiTableRevision;
 
   /// The ACPI Table Generator ID
   ACPI_TABLE_GENERATOR_IDTableGeneratorId;
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46269): https://edk2.groups.io/g/devel/message/46269
Mute This Topic: https://groups.io/mt/32999787/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-