public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Sami Mujawar" <sami.mujawar@arm.com>
To: <devel@edk2.groups.io>
Cc: Sami Mujawar <sami.mujawar@arm.com>, <Alexei.Fedorov@arm.com>,
	<leif.lindholm@linaro.org>, <Matteo.Carlini@arm.com>,
	<Laura.Moretta@arm.com>, <nd@arm.com>
Subject: [PATCH v2 01/16] DynamicTablesPkg: Fix entry point param definition
Date: Sun, 29 Mar 2020 16:13:38 +0100	[thread overview]
Message-ID: <20200329151353.14096-2-sami.mujawar@arm.com> (raw)
In-Reply-To: <20200329151353.14096-1-sami.mujawar@arm.com>

VS2017 reports 'warning C4028: formal parameter 2 different
from declaration' for the library constructor and destructor
interfaces for the Generator modules. VS2017 compiler also
reports similar warnings for the DXE entry points.

Remove the CONST qualifier for the SystemTable pointer (the
second parameter to the constructor/destructor/DXE Entry
point) to make it compatible with the formal declaration.

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
---

Notes:
    v2:
      Splitting patch series and re-submitting DynamicTablesPkg     [SAMI]
      patches from https://edk2.groups.io/g/devel/message/46261

 DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFactoryDxe.c | 6 +++---
 DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.c | 4 ++--
 DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c         | 8 ++++----
 DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c         | 8 ++++----
 DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c         | 8 ++++----
 DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c         | 8 ++++----
 DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c         | 8 ++++----
 DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c         | 8 ++++----
 DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c         | 8 ++++----
 DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/RawGenerator.c           | 8 ++++----
 DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c         | 8 ++++----
 11 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFactoryDxe.c b/DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFactoryDxe.c
index d87ea7809eae09cdb5ff06290cff8c2d7e7fa904..d1432348f05143bed8588cea54d7b9b6722b9b6d 100644
--- a/DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFactoryDxe.c
+++ b/DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFactoryDxe.c
@@ -1,7 +1,7 @@
 /** @file
   Dynamic Table Factory Dxe
 
-  Copyright (c) 2017 - 2018, ARM Limited. All rights reserved.
+  Copyright (c) 2017 - 2019, ARM Limited. All rights reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -60,8 +60,8 @@ EDKII_DYNAMIC_TABLE_FACTORY_PROTOCOL DynamicTableFactoryProtocol = {
 EFI_STATUS
 EFIAPI
 DynamicTableFactoryDxeInitialize (
-  IN  EFI_HANDLE                 ImageHandle,
-  IN  EFI_SYSTEM_TABLE   * CONST SystemTable
+  IN  EFI_HANDLE            ImageHandle,
+  IN  EFI_SYSTEM_TABLE   *  SystemTable
   )
 {
   EFI_STATUS  Status;
diff --git a/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.c b/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.c
index 39b75996d9922d2daf953bb28809aa285f7d214c..e27dcaf37470d811c4d6218d4f40d2260f550c02 100644
--- a/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.c
+++ b/DynamicTablesPkg/Drivers/DynamicTableManagerDxe/DynamicTableManagerDxe.c
@@ -655,8 +655,8 @@ ProcessAcpiTables (
 EFI_STATUS
 EFIAPI
 DynamicTableManagerDxeInitialize (
-  IN CONST EFI_HANDLE                 ImageHandle,
-  IN       EFI_SYSTEM_TABLE   * CONST SystemTable
+  IN  EFI_HANDLE            ImageHandle,
+  IN  EFI_SYSTEM_TABLE   *  SystemTable
   )
 {
   EFI_STATUS                                 Status;
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c
index 0b45e15d2d1c2c1e35e801ca719d68d9ff88a65e..346ab5b22f5402bf87c385558f68f080d1b454ed 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiDbg2LibArm/Dbg2Generator.c
@@ -418,8 +418,8 @@ ACPI_TABLE_GENERATOR Dbg2Generator = {
 EFI_STATUS
 EFIAPI
 AcpiDbg2LibConstructor (
-  IN CONST EFI_HANDLE                ImageHandle,
-  IN       EFI_SYSTEM_TABLE  * CONST SystemTable
+  IN  EFI_HANDLE           ImageHandle,
+  IN  EFI_SYSTEM_TABLE  *  SystemTable
   )
 {
   EFI_STATUS  Status;
@@ -442,8 +442,8 @@ AcpiDbg2LibConstructor (
 EFI_STATUS
 EFIAPI
 AcpiDbg2LibDestructor (
-  IN CONST EFI_HANDLE                ImageHandle,
-  IN       EFI_SYSTEM_TABLE  * CONST SystemTable
+  IN  EFI_HANDLE           ImageHandle,
+  IN  EFI_SYSTEM_TABLE  *  SystemTable
   )
 {
   EFI_STATUS  Status;
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c
index 1f05a04c7cab0ce3d1264e34d9d0ef252277d81e..b748c982b285a8f6c012c0e08fb95c9904f47730 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiFadtLibArm/FadtGenerator.c
@@ -648,8 +648,8 @@ ACPI_TABLE_GENERATOR FadtGenerator = {
 EFI_STATUS
 EFIAPI
 AcpiFadtLibConstructor (
-  IN CONST EFI_HANDLE                ImageHandle,
-  IN       EFI_SYSTEM_TABLE  * CONST SystemTable
+  IN  EFI_HANDLE           ImageHandle,
+  IN  EFI_SYSTEM_TABLE  *  SystemTable
   )
 {
   EFI_STATUS  Status;
@@ -671,8 +671,8 @@ AcpiFadtLibConstructor (
 EFI_STATUS
 EFIAPI
 AcpiFadtLibDestructor (
-  IN CONST EFI_HANDLE                ImageHandle,
-  IN       EFI_SYSTEM_TABLE  * CONST SystemTable
+  IN  EFI_HANDLE           ImageHandle,
+  IN  EFI_SYSTEM_TABLE  *  SystemTable
   )
 {
   EFI_STATUS  Status;
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c
index a30870806d7f223fde7311e3609cca92f47731cc..7e86c30649bd36ecebac75c7e3a86a0c25cd590b 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiGtdtLibArm/GtdtGenerator.c
@@ -738,8 +738,8 @@ ACPI_TABLE_GENERATOR GtdtGenerator = {
 EFI_STATUS
 EFIAPI
 AcpiGtdtLibConstructor (
-  IN CONST EFI_HANDLE                ImageHandle,
-  IN       EFI_SYSTEM_TABLE  * CONST SystemTable
+  IN  EFI_HANDLE           ImageHandle,
+  IN  EFI_SYSTEM_TABLE  *  SystemTable
   )
 {
   EFI_STATUS  Status;
@@ -761,8 +761,8 @@ AcpiGtdtLibConstructor (
 EFI_STATUS
 EFIAPI
 AcpiGtdtLibDestructor (
-  IN CONST EFI_HANDLE                ImageHandle,
-  IN       EFI_SYSTEM_TABLE  * CONST SystemTable
+  IN  EFI_HANDLE           ImageHandle,
+  IN  EFI_SYSTEM_TABLE  *  SystemTable
   )
 {
   EFI_STATUS  Status;
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c
index 05e360c899c7563aed04c071921865929524fdc4..f303e9f29cc700634d236c08505cab91b9d62cb8 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c
@@ -2040,8 +2040,8 @@ ACPI_IORT_GENERATOR IortGenerator = {
 EFI_STATUS
 EFIAPI
 AcpiIortLibConstructor (
-  IN CONST EFI_HANDLE                ImageHandle,
-  IN       EFI_SYSTEM_TABLE  * CONST SystemTable
+  IN  EFI_HANDLE           ImageHandle,
+  IN  EFI_SYSTEM_TABLE  *  SystemTable
   )
 {
   EFI_STATUS  Status;
@@ -2063,8 +2063,8 @@ AcpiIortLibConstructor (
 EFI_STATUS
 EFIAPI
 AcpiIortLibDestructor (
-  IN CONST EFI_HANDLE                ImageHandle,
-  IN       EFI_SYSTEM_TABLE  * CONST SystemTable
+  IN  EFI_HANDLE           ImageHandle,
+  IN  EFI_SYSTEM_TABLE  *  SystemTable
   )
 {
   EFI_STATUS  Status;
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c
index dc5238078376746847e7ae14258bbe35ca07ca2c..2651ca15414694c494678bcec655fc882ee2cc0c 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMadtLibArm/MadtGenerator.c
@@ -795,8 +795,8 @@ ACPI_TABLE_GENERATOR MadtGenerator = {
 EFI_STATUS
 EFIAPI
 AcpiMadtLibConstructor (
-  IN CONST EFI_HANDLE                ImageHandle,
-  IN       EFI_SYSTEM_TABLE  * CONST SystemTable
+  IN  EFI_HANDLE           ImageHandle,
+  IN  EFI_SYSTEM_TABLE  *  SystemTable
   )
 {
   EFI_STATUS  Status;
@@ -818,8 +818,8 @@ AcpiMadtLibConstructor (
 EFI_STATUS
 EFIAPI
 AcpiMadtLibDestructor (
-  IN CONST EFI_HANDLE                ImageHandle,
-  IN       EFI_SYSTEM_TABLE  * CONST SystemTable
+  IN  EFI_HANDLE           ImageHandle,
+  IN  EFI_SYSTEM_TABLE  *  SystemTable
   )
 {
   EFI_STATUS  Status;
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c
index d219e2f04ad6602b8157b048ae840a3094492680..1293ac8e43c8e0ed641b20ba42519172bc541b54 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiMcfgLibArm/McfgGenerator.c
@@ -329,8 +329,8 @@ ACPI_TABLE_GENERATOR McfgGenerator = {
 EFI_STATUS
 EFIAPI
 AcpiMcfgLibConstructor (
-  IN CONST EFI_HANDLE                ImageHandle,
-  IN       EFI_SYSTEM_TABLE  * CONST SystemTable
+  IN  EFI_HANDLE           ImageHandle,
+  IN  EFI_SYSTEM_TABLE  *  SystemTable
   )
 {
   EFI_STATUS  Status;
@@ -352,8 +352,8 @@ AcpiMcfgLibConstructor (
 EFI_STATUS
 EFIAPI
 AcpiMcfgLibDestructor (
-  IN CONST EFI_HANDLE                ImageHandle,
-  IN       EFI_SYSTEM_TABLE  * CONST SystemTable
+  IN  EFI_HANDLE           ImageHandle,
+  IN  EFI_SYSTEM_TABLE  *  SystemTable
   )
 {
   EFI_STATUS  Status;
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c
index c8713dec625cc18b0806659ffcdc3d9e70411e11..9e42eee9b75bb330833b0f56c98947563d9eb821 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiPpttLibArm/PpttGenerator.c
@@ -1492,8 +1492,8 @@ ACPI_PPTT_GENERATOR PpttGenerator = {
 EFI_STATUS
 EFIAPI
 AcpiPpttLibConstructor (
-  IN CONST EFI_HANDLE                ImageHandle,
-  IN       EFI_SYSTEM_TABLE  * CONST SystemTable
+  IN  EFI_HANDLE           ImageHandle,
+  IN  EFI_SYSTEM_TABLE  *  SystemTable
   )
 {
   EFI_STATUS  Status;
@@ -1516,8 +1516,8 @@ AcpiPpttLibConstructor (
 EFI_STATUS
 EFIAPI
 AcpiPpttLibDestructor (
-  IN CONST EFI_HANDLE                ImageHandle,
-  IN       EFI_SYSTEM_TABLE  * CONST SystemTable
+  IN  EFI_HANDLE           ImageHandle,
+  IN  EFI_SYSTEM_TABLE  *  SystemTable
   )
 {
   EFI_STATUS  Status;
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/RawGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/RawGenerator.c
index 544ea06f0bcb3442b78cf6409846f70ae5360664..2facfaa048115575829c9787084876efbe60834a 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/RawGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiRawLibArm/RawGenerator.c
@@ -109,8 +109,8 @@ ACPI_TABLE_GENERATOR RawGenerator = {
 EFI_STATUS
 EFIAPI
 AcpiRawLibConstructor (
-  IN CONST EFI_HANDLE                ImageHandle,
-  IN       EFI_SYSTEM_TABLE  * CONST SystemTable
+  IN  EFI_HANDLE           ImageHandle,
+  IN  EFI_SYSTEM_TABLE  *  SystemTable
   )
 {
   EFI_STATUS  Status;
@@ -132,8 +132,8 @@ AcpiRawLibConstructor (
 EFI_STATUS
 EFIAPI
 AcpiRawLibDestructor (
-  IN CONST EFI_HANDLE                ImageHandle,
-  IN       EFI_SYSTEM_TABLE  * CONST SystemTable
+  IN  EFI_HANDLE           ImageHandle,
+  IN  EFI_SYSTEM_TABLE  *  SystemTable
   )
 {
   EFI_STATUS  Status;
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c
index 7b70ba2c2c55a9a15a569680d1a57b359db4e73d..1404279f828d5c06bb7605cb2fe6d864ef7a080e 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSpcrLibArm/SpcrGenerator.c
@@ -308,8 +308,8 @@ ACPI_TABLE_GENERATOR SpcrGenerator = {
 EFI_STATUS
 EFIAPI
 AcpiSpcrLibConstructor (
-  IN CONST EFI_HANDLE                ImageHandle,
-  IN       EFI_SYSTEM_TABLE  * CONST SystemTable
+  IN  EFI_HANDLE           ImageHandle,
+  IN  EFI_SYSTEM_TABLE  *  SystemTable
   )
 {
   EFI_STATUS  Status;
@@ -331,8 +331,8 @@ AcpiSpcrLibConstructor (
 EFI_STATUS
 EFIAPI
 AcpiSpcrLibDestructor (
-  IN CONST EFI_HANDLE                ImageHandle,
-  IN       EFI_SYSTEM_TABLE  * CONST SystemTable
+  IN  EFI_HANDLE           ImageHandle,
+  IN  EFI_SYSTEM_TABLE  *  SystemTable
   )
 {
   EFI_STATUS  Status;
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'


  reply	other threads:[~2020-03-29 15:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-29 15:13 [PATCH v2 00/16] Fix warnings reported by VS2017 compiler Sami Mujawar
2020-03-29 15:13 ` Sami Mujawar [this message]
2020-03-30  8:09   ` [edk2-devel] [PATCH v2 01/16] DynamicTablesPkg: Fix entry point param definition Ard Biesheuvel
2020-03-29 15:13 ` [PATCH v2 02/16] DynamicTablesPkg: Fix missing local header warning Sami Mujawar
2020-03-30  8:09   ` [edk2-devel] " Ard Biesheuvel
2020-03-29 15:13 ` [PATCH v2 03/16] DynamicTablesPkg: Remove struct CM_ARM_CPU_INFO Sami Mujawar
2020-03-30  8:10   ` [edk2-devel] " Ard Biesheuvel
2020-03-29 15:13 ` [PATCH v2 04/16] DynamicTablesPkg: Fix serial port subtype warning Sami Mujawar
2020-03-29 15:13 ` [PATCH v2 05/16] DynamicTablesPkg: Fix Proc node length assignment Sami Mujawar
2020-03-30  8:11   ` [edk2-devel] " Ard Biesheuvel
2020-03-29 15:13 ` [PATCH v2 06/16] DynamicTablesPkg: Fix GT Block " Sami Mujawar
2020-03-29 15:13 ` [PATCH v2 07/16] DynamicTablesPkg: Fix Boot arch flag width Sami Mujawar
2020-03-29 15:13 ` [PATCH v2 08/16] DynamicTablesPkg: Fix ACPI table rev field width Sami Mujawar
2020-03-30  8:11   ` [edk2-devel] " Ard Biesheuvel
2020-03-29 15:13 ` [PATCH v2 09/16] DynamicTablesPkg: Fix unaligned pointers usage Sami Mujawar
2020-03-29 15:13 ` [PATCH v2 10/16] DynamicTablesPkg: Serial debug port initialisation Sami Mujawar
2020-03-29 15:13 ` [PATCH v2 11/16] DynamicTablesPkg: Remove redundant frame count check Sami Mujawar
2020-03-29 15:13 ` [PATCH v2 12/16] DynamicTablesPkg: Fix IORT node length assignment Sami Mujawar
2020-03-29 15:13 ` [PATCH v2 13/16] DynamicTablesPkg: IORT: Fix uninitialized memory usage Sami Mujawar
2020-03-29 15:13 ` [PATCH v2 14/16] DynamicTablesPkg: PPTT: " Sami Mujawar
2020-03-29 15:13 ` [PATCH v2 15/16] DynamicTablesPkg: Remove erroneous use of EFIAPI Sami Mujawar
2020-03-29 15:13 ` [PATCH v2 16/16] DynamicTablesPkg: Option for VS2017 static code analysis Sami Mujawar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200329151353.14096-2-sami.mujawar@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox