public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Nhi Pham via groups.io" <nhi=os.amperecomputing.com@groups.io>
To: Laszlo Ersek <lersek@redhat.com>,
	edk2-devel-groups-io <devel@edk2.groups.io>
Cc: Chuong Tran <chuong@os.amperecomputing.com>,
	Leif Lindholm <quic_llindhol@quicinc.com>,
	Rebecca Cran <rebecca@os.amperecomputing.com>
Subject: Re: [edk2-devel] [edk2-platforms PATCH 12/19] AmpereAltraPkg/Ac01PcieLib: fix compilation error
Date: Fri, 13 Oct 2023 10:24:53 +0700	[thread overview]
Message-ID: <14fb38d6-5a58-4eca-83af-ed9a5d453298@os.amperecomputing.com> (raw)
In-Reply-To: <0c983e60-e094-d1b1-fb20-aecd533a822e@os.amperecomputing.com>

HI Lazslo,

I was not reviewing carefully. The MmioRead32 is redundant code. Can you 
help me get rid of that code?

Thanks,
Nhi

On 10/13/2023 9:20 AM, Nhi Pham wrote:
> Thanks for fixing it.
> 
> Reviewed-by: Nhi Pham <nhi@os.amperecomputing.com>
> 
> Regards,
> Nhi
> 
> On 10/12/2023 4:09 PM, Laszlo Ersek wrote:
>> Commit 380b4b40c60d ("AmpereAltraPkg: Update Ampere specific platform 
>> PCIe
>> core", 2023-03-29) removed the DEBUG macro call from
>> Ac01PcieCoreUpdateLink() that was the only reader of "Val". Since then,
>> Val has only been set, but never read. This triggers
>> "-Werror=unused-but-set-variable".
>>
>> Found when trying to build "Jade.dsc".
>>
>> Keep the MmioRead32() call, so that the PCIe config space sees the same
>> behavior as before, but explicitly throw away the result.
>>
>> Cc: Chuong Tran <chuong@os.amperecomputing.com>
>> Cc: Leif Lindholm <quic_llindhol@quicinc.com>
>> Cc: Nhi Pham <nhi@os.amperecomputing.com>
>> Cc: Rebecca Cran <rebecca@os.amperecomputing.com>
>> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564
>> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
>> ---
>>   Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git 
>> a/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c 
>> b/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
>> index 3c1fe5e35ca2..fa00c1e36999 100644
>> --- a/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
>> +++ b/Silicon/Ampere/AmpereAltraPkg/Library/Ac01PcieLib/PcieCore.c
>> @@ -1747,7 +1747,6 @@ Ac01PcieCoreUpdateLink (
>>     PHYSICAL_ADDRESS          CfgBase;
>>     UINT8                     PcieIndex;
>>     UINT32                    Index;
>> -  UINT32                    Val;
>>     *IsNextRoundNeeded = FALSE;
>>     *FailedPcieCount   = 0;
>> @@ -1767,7 +1766,7 @@ Ac01PcieCoreUpdateLink (
>>       if (Pcie->Active && !Pcie->LinkUp) {
>>         if (PcieLinkUpCheck (Pcie)) {
>>           Pcie->LinkUp = TRUE;
>> -        Val = MmioRead32 (CfgBase + PCIE_CAPABILITY_BASE + 
>> LINK_CONTROL_LINK_STATUS_REG);
>> +        (VOID)MmioRead32 (CfgBase + PCIE_CAPABILITY_BASE + 
>> LINK_CONTROL_LINK_STATUS_REG);
>>           // Doing link checking and recovery if needed
>>           Ac01PcieCoreQoSLinkCheckRecovery (RootComplex, PcieIndex);
>>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109581): https://edk2.groups.io/g/devel/message/109581
Mute This Topic: https://groups.io/mt/101914660/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2023-10-13  3:25 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-12  9:08 [edk2-devel] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
2023-10-12  9:09 ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 01/19] Hisilicon: enable NOOPT builds Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 02/19] Hisilicon/FlashFvbDxe: fix PcdNorFlashCheckBlockLocked token space GUID Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 03/19] Hisilicon.dsc.inc: resolve VariableFlashInfoLib Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 04/19] Hisilicon: rename OemMiscLib class to HisiOemMiscLib Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 05/19] Hisilicon: add missing include file to Pptt components Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 06/19] Hisilicon/Hi1620AcpiTables: fix up ASL Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 07/19] Hisilicon/ProcessorSubClassDxe: drop conflicting PROCESSOR_STATUS_DATA type Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 08/19] Hisilicon: drop unused DS3231RealTimeClockLib instance Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 09/19] Hisilicon: drop unused VirtualRealTimeClockLib instance Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 10/19] Hisilicon/DS3231RealTimeClockLib: drop LibRtcVirtualNotifyEvent Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 11/19] Hisilicon/RX8900RealTimeClockLib: " Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 12/19] AmpereAltraPkg/Ac01PcieLib: fix compilation error Laszlo Ersek
2023-10-13  2:20     ` Nhi Pham via groups.io
2023-10-13  3:24       ` Nhi Pham via groups.io [this message]
2023-10-13 20:37         ` Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 13/19] JadePkg/PCF85063RealTimeClockLib: hide LibRtcVirtualNotifyEvent Laszlo Ersek
2023-10-13  2:24     ` Nhi Pham via groups.io
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 14/19] LoongArchQemuPkg/LsRealTimeClockLib: " Laszlo Ersek
2023-10-12 12:14     ` xianglai
2023-10-12 12:25       ` Chao Li
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 15/19] Styx/RealTimeClockLib: " Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 16/19] Armada7k8k/RealTimeClockLib: " Laszlo Ersek
2023-10-12 14:32     ` Marcin Wojtas via groups.io
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 17/19] NXP/Pcf8563RealTimeClockLib: " Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 18/19] FT2000-4Pkg/RealTimeClockLib: " Laszlo Ersek
2023-10-12  9:09   ` [edk2-devel] [edk2-platforms PATCH 19/19] Omap35xxPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent Laszlo Ersek
2023-10-13 10:12   ` [edk2-devel] [edk2-platforms PATCH 00/19] let LibRtcVirtualNotifyEvent() be dropped Ard Biesheuvel
2023-10-13 20:42     ` Laszlo Ersek
2023-10-12  9:10 ` [edk2-devel] [edk2-non-osi PATCH 0/1] Hisilicon: rename OemMiscLib class dependencies to HisiOemMiscLib Laszlo Ersek
2023-10-12  9:10   ` [edk2-devel] [edk2-non-osi PATCH 1/1] " Laszlo Ersek
2023-10-12  9:10 ` [edk2-devel] [PATCH 0/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
2023-10-12  9:10   ` [edk2-devel] [PATCH 1/5] PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe: rename LibRtcVirtualNotifyEvent Laszlo Ersek
2023-10-12 12:33     ` Sami Mujawar
2023-10-18 13:42       ` Laszlo Ersek
2023-10-18 15:15         ` Sami Mujawar
2023-10-18 15:19           ` Laszlo Ersek
2023-10-12  9:10   ` [edk2-devel] [PATCH 2/5] ArmPlatformPkg/PL031RealTimeClockLib: hide LibRtcVirtualNotifyEvent Laszlo Ersek
2023-10-12 12:31     ` Sami Mujawar
2023-10-12  9:10   ` [edk2-devel] [PATCH 3/5] EmbeddedPkg/TemplateRealTimeClockLib: drop LibRtcVirtualNotifyEvent Laszlo Ersek
2023-10-12  9:10   ` [edk2-devel] [PATCH 4/5] EmbeddedPkg/VirtualRealTimeClockLib: " Laszlo Ersek
2023-10-12  9:10   ` [edk2-devel] [PATCH 5/5] EmbeddedPkg/RealTimeClockLib: drop LibRtcVirtualNotifyEvent from lib class Laszlo Ersek
2023-10-18 13:42   ` [edk2-devel] [PATCH 0/5] " Laszlo Ersek
2023-10-18 13:44     ` Ard Biesheuvel
2023-10-18 17:03       ` Laszlo Ersek

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=14fb38d6-5a58-4eca-83af-ed9a5d453298@os.amperecomputing.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