public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] Platform/ARM/VExpressPkg: Fix unused but set
@ 2021-04-23 19:43 Adrián Herrera
  2021-04-26 17:58 ` [edk2-devel] " Sami Mujawar
  0 siblings, 1 reply; 2+ messages in thread
From: Adrián Herrera @ 2021-04-23 19:43 UTC (permalink / raw)
  To: devel; +Cc: Adrián Herrera

Remove unused but set variables in GetArmNameSpaceObject. These caused a
build crash due to -Werror=unused-but-set-variable.

Signed-off-by: Adrián Herrera <adr.her.arc.95@gmail.com>
---
 .../ConfigurationManagerDxe/ConfigurationManager.c          | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index e99fbb654f..d169cd2c5d 100644
--- a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -721,8 +721,6 @@ GetArmNameSpaceObject (
   UINTN                             Smmuv3Count;
   UINTN                             ItsGroupCount;
   UINTN                             ItsIdentifierArrayCount;
-  UINTN                             RootComplexCount;
-  UINTN                             DeviceIdMappingArrayCount;
   UINTN                             PciConfigSpaceCount;
 
   if ((This == NULL) || (CmObject == NULL)) {
@@ -739,15 +737,11 @@ GetArmNameSpaceObject (
     Smmuv3Count = 1;
     ItsGroupCount = 1;
     ItsIdentifierArrayCount = ARRAY_SIZE (PlatformRepo->ItsIdentifierArray);
-    RootComplexCount = 1;
-    DeviceIdMappingArrayCount = ARRAY_SIZE (PlatformRepo->DeviceIdMapping);
     PciConfigSpaceCount = 1;
   } else {
     Smmuv3Count = 0;
     ItsGroupCount = 0;
     ItsIdentifierArrayCount = 0;
-    RootComplexCount = 0;
-    DeviceIdMappingArrayCount = 0;
     PciConfigSpaceCount = 0;
   }
 
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [edk2-devel] [PATCH] Platform/ARM/VExpressPkg: Fix unused but set
  2021-04-23 19:43 [PATCH] Platform/ARM/VExpressPkg: Fix unused but set Adrián Herrera
@ 2021-04-26 17:58 ` Sami Mujawar
  0 siblings, 0 replies; 2+ messages in thread
From: Sami Mujawar @ 2021-04-26 17:58 UTC (permalink / raw)
  To: devel@edk2.groups.io, adr.her.arc.95@gmail.com; +Cc: Adrián Herrera, nd

[-- Attachment #1: Type: text/plain, Size: 2391 bytes --]

Hi Adrian,

Thank you for this patch.

The changes look good to me. Can you let me know which compiler toolchain flagged up this error/build crash, please?

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

From: devel@edk2.groups.io <devel@edk2.groups.io> on behalf of Adrián Herrera via groups.io <adr.her.arc.95=gmail.com@groups.io>
Date: Saturday, 24 April 2021 at 03:58
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Adrián Herrera <adr.her.arc.95@gmail.com>
Subject: [edk2-devel] [PATCH] Platform/ARM/VExpressPkg: Fix unused but set
Remove unused but set variables in GetArmNameSpaceObject. These caused a
build crash due to -Werror=unused-but-set-variable.

Signed-off-by: Adrián Herrera <adr.her.arc.95@gmail.com>
---
 .../ConfigurationManagerDxe/ConfigurationManager.c          | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
index e99fbb654f..d169cd2c5d 100644
--- a/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
+++ b/Platform/ARM/VExpressPkg/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c
@@ -721,8 +721,6 @@ GetArmNameSpaceObject (
   UINTN                             Smmuv3Count;


   UINTN                             ItsGroupCount;


   UINTN                             ItsIdentifierArrayCount;


-  UINTN                             RootComplexCount;


-  UINTN                             DeviceIdMappingArrayCount;


   UINTN                             PciConfigSpaceCount;





   if ((This == NULL) || (CmObject == NULL)) {


@@ -739,15 +737,11 @@ GetArmNameSpaceObject (
     Smmuv3Count = 1;


     ItsGroupCount = 1;


     ItsIdentifierArrayCount = ARRAY_SIZE (PlatformRepo->ItsIdentifierArray);


-    RootComplexCount = 1;


-    DeviceIdMappingArrayCount = ARRAY_SIZE (PlatformRepo->DeviceIdMapping);


     PciConfigSpaceCount = 1;


   } else {


     Smmuv3Count = 0;


     ItsGroupCount = 0;


     ItsIdentifierArrayCount = 0;


-    RootComplexCount = 0;


-    DeviceIdMappingArrayCount = 0;


     PciConfigSpaceCount = 0;


   }





--
2.30.0






[-- Attachment #2: Type: text/html, Size: 6671 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-26 17:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-23 19:43 [PATCH] Platform/ARM/VExpressPkg: Fix unused but set Adrián Herrera
2021-04-26 17:58 ` [edk2-devel] " Sami Mujawar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox