From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id C9631780091 for ; Fri, 13 Oct 2023 20:38:03 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=1rWn3xzYuAtYti16M49ThJWVjEeVtgxlhxmioqlUJz8=; c=relaxed/simple; d=groups.io; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1697229482; v=1; b=QYJRnZDe98LKXbnwRmLquiLRr1nshscSMrB07S/dumzjpB5eUZjdBO84aOLyOkiFf3rqqchd ++igIv1SUcVyg/2rXv+XT94aZvGz+JmDoXfggCI2c3z0eDqUS0FiG40M9QIxFXdZ0kv7RYKJ5eW k2P1PrM0P1DTjJvDxMJXWlcY= X-Received: by 127.0.0.2 with SMTP id GSJ7YY7687511xdZDVW9Be1y; Fri, 13 Oct 2023 13:38:02 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.49492.1697229481441322142 for ; Fri, 13 Oct 2023 13:38:01 -0700 X-Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-184-O7Z2KkiMMQyK9xwTIl6DLQ-1; Fri, 13 Oct 2023 16:37:58 -0400 X-MC-Unique: O7Z2KkiMMQyK9xwTIl6DLQ-1 X-Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 775C0800162; Fri, 13 Oct 2023 20:37:57 +0000 (UTC) X-Received: from [10.39.192.13] (unknown [10.39.192.13]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 90BA063F45; Fri, 13 Oct 2023 20:37:56 +0000 (UTC) Message-ID: Date: Fri, 13 Oct 2023 22:37:55 +0200 MIME-Version: 1.0 Subject: Re: [edk2-devel] [edk2-platforms PATCH 12/19] AmpereAltraPkg/Ac01PcieLib: fix compilation error To: Nhi Pham , edk2-devel-groups-io Cc: Chuong Tran , Leif Lindholm , Rebecca Cran References: <687bbaf5-3c2b-6d27-44a5-d19541ce97bd@redhat.com> <20231012090950.108577-1-lersek@redhat.com> <20231012090950.108577-13-lersek@redhat.com> <0c983e60-e094-d1b1-fb20-aecd533a822e@os.amperecomputing.com> <14fb38d6-5a58-4eca-83af-ed9a5d453298@os.amperecomputing.com> From: "Laszlo Ersek" In-Reply-To: <14fb38d6-5a58-4eca-83af-ed9a5d453298@os.amperecomputing.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: TfOtwEwBdwH1P66FH6e6ehcdx7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=QYJRnZDe; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 10/13/23 05:24, Nhi Pham wrote: > HI Lazslo, > > I was not reviewing carefully. The MmioRead32 is redundant code. Can you > help me get rid of that code? Sure, if you don't need the read access to the LINK_CONTROL_LINK_STATUS_REG register, I can drop that too; I just didn't want to do it without asking. Thansk Laszlo > > Thanks, > Nhi > > On 10/13/2023 9:20 AM, Nhi Pham wrote: >> Thanks for fixing it. >> >> Reviewed-by: Nhi Pham >> >> 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 >>> Cc: Leif Lindholm >>> Cc: Nhi Pham >>> Cc: Rebecca Cran >>> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4564 >>> Signed-off-by: Laszlo Ersek >>> --- >>>   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 (#109609): https://edk2.groups.io/g/devel/message/109609 Mute This Topic: https://groups.io/mt/101914660/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-