From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by mx.groups.io with SMTP id smtpd.web11.45462.1585555766057212923 for ; Mon, 30 Mar 2020 01:09:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=txXXS9Oy; spf=pass (domain: linaro.org, ip: 209.85.128.68, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wm1-f68.google.com with SMTP id i19so442042wmb.0 for ; Mon, 30 Mar 2020 01:09:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fQpAzt/AFrmtCtn69ctsTJzd0a9+OJHcxYq5bN4tPDQ=; b=txXXS9OyS1o1EayGCfpKZ/mbmePyoRGw4+KNfinm+d2vVYtSWhiQ/jQ1QETPj1VKGZ 5CdfZlvOvzYvzx7JfWx3XcbhF/Ak6F2WqpeBQOm6pbl2hgjGIM2HSUaSX9bzBW1x6FFo Kuq7PwtMukeEivyb9vtJZg7mV9GyzzMK5+BEn2o+50hzRxePty80xnB8OKgKLF4yRUAE Uxy+qiwFGnSxXOcXwbrb7F445CO5+/EGcNHqkfzFqW/ExLVgV3w25FE6EQ7YB1b0L3Pe 27JxCMxX3hFDW05jz7xNmpTQhFJ+fSiZQz+ecWmE5mfu0/4NxTdLJKmZ+61SSCHXfHv9 NoPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fQpAzt/AFrmtCtn69ctsTJzd0a9+OJHcxYq5bN4tPDQ=; b=pEolfEcKLYzvIcRRIBvUfrDTEKoXGPmgwrZQyqdN8WJkwIB27QC4aA2xMRJBIKnZCC pK1nrjP9oMOkTAhpIVY20DAKHm/Ob3P7tuayAmFHQnC0M7Ltn4wwAnMmmmG5/tRY1f7Y 2pId3VV20/qY6n0+UKpPEx0Eeq67feigRpuavJKojz7XLWqRLPxfV3KMBENOpCdlkEAe mPGHE47/hSSVa2SzOHKYsTGX+HYNGFX0PACY5fUXmjQ5XAbLY2Qw4cJjQ0rzRi90qEHc 3G3X+tWgv0lg/2ex2we6/cbP329Xw2W+o6n+V/uIrW3h5rNMu2XCpjgcd+1OGetG/RDc q4BQ== X-Gm-Message-State: ANhLgQ1rQDyano5KekcPikCJQBlOlhig/OkC3zWnLH8xJ5XwgOGl+UAW oXLhlhpayiOLCicXvjFA0KdfOeSU6fpKCHyX+spcU1F379/gzg== X-Google-Smtp-Source: ADFU+vtfqKvu9hJXUcHdPTijga81vU3wSaYS/VhA8ISMgelHaeRnf15KyigwAcTBRJluvFLbRK0TSkDDmC14v1HdiBA= X-Received: by 2002:a1c:6285:: with SMTP id w127mr12492269wmb.133.1585555764163; Mon, 30 Mar 2020 01:09:24 -0700 (PDT) MIME-Version: 1.0 References: <20200329151353.14096-1-sami.mujawar@arm.com> <20200329151353.14096-2-sami.mujawar@arm.com> In-Reply-To: <20200329151353.14096-2-sami.mujawar@arm.com> From: "Ard Biesheuvel" Date: Mon, 30 Mar 2020 10:09:12 +0200 Message-ID: Subject: Re: [edk2-devel] [PATCH v2 01/16] DynamicTablesPkg: Fix entry point param definition To: edk2-devel-groups-io , Sami Mujawar Cc: Alexei Fedorov , "(Exiting) Leif Lindholm" , Matteo Carlini , Laura Moretta , nd Content-Type: text/plain; charset="UTF-8" On Sun, 29 Mar 2020 at 17:14, Sami Mujawar wrote: > > 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 > Reviewed-by: Alexei Fedorov > --- > > 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 Can we make this > + IN EFI_SYSTEM_TABLE *SystemTable instead? (throughout this patch) > ) > { > 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)' > > > >