From patchwork Thu Mar 24 06:28:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 64289 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp451444lbc; Wed, 23 Mar 2016 23:28:30 -0700 (PDT) X-Received: by 10.66.138.74 with SMTP id qo10mr10079954pab.140.1458800910280; Wed, 23 Mar 2016 23:28:30 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id l79si9917657pfj.200.2016.03.23.23.28.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Mar 2016 23:28:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id E21211A1EF3; Wed, 23 Mar 2016 23:28:53 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received: from mail-wm0-x236.google.com (mail-wm0-x236.google.com [IPv6:2a00:1450:400c:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 015841A1E66 for ; Wed, 23 Mar 2016 23:28:53 -0700 (PDT) Received: by mail-wm0-x236.google.com with SMTP id l68so51715897wml.1 for ; Wed, 23 Mar 2016 23:28:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ADzkwxyZLko9TFAqGG7hSJka9BmHtr6Z/n8fK+vU54E=; b=QJO+sElpf3AND12QEyK3WQBi+u0enebemp+T0YY3hh4MbkgsnGfwCZqzFS0uQi1Gl6 6LlXfq2d5bnsbtoj/jbJHcGrYdprmq57Rad3pNpvPde8wZm8nQl4VEHjP3EHN71669Ys INTfSFOJ3S4XR0CRqATg24MqTUzjOhUh8Y3XI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ADzkwxyZLko9TFAqGG7hSJka9BmHtr6Z/n8fK+vU54E=; b=MPYpJtDX1NIv6c3vO7gkfqaPLuT78s0X4eWT/egyP18bQZybr1/hLEINtBV3pmoEM9 Ejoug1sMWbBAbnB3sHt5zRTlzBTtFK6nmaJGPQGk4JOm17nRvqaWWGDgCvH/RtP4j5th TRCkQBiRNA55IULlkdZfEcYe4iZ2CbTF283mSkW6M+kZMIJeTmvW+BGSv3Dyo4PJQEFx vY9HAH+Y9CjHG1Uk/jDTJUpA44V8asqpSO610oSOJww/NbfQYukX2k8Hp2eRl/1HxXxx AQ4QoMri9DMqaHoq8/vdoQssGIFuEjv5zTDu/4EDuJYeFmz5kfbwlXhKxrOfG9rwVOh2 BWDA== X-Gm-Message-State: AD7BkJKxQRih8JSMLKffOkc29BjFuiA5N7hSUmwZYsq2apHnCWULhHkNWgssYXJZ/sCpfyDu X-Received: by 10.28.128.83 with SMTP id b80mr8391598wmd.6.1458800906623; Wed, 23 Mar 2016 23:28:26 -0700 (PDT) Received: from localhost.localdomain (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by smtp.gmail.com with ESMTPSA id w8sm5814691wjf.19.2016.03.23.23.28.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Mar 2016 23:28:25 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, lersek@redhat.com, liming.gao@intel.com, star.zeng@intel.com, feng.tian@intel.com, shumin.qiu@intel.com, jaben.carsey@intel.com, jeff.fan@intel.com Date: Thu, 24 Mar 2016 07:28:17 +0100 Message-Id: <1458800900-11913-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1458800900-11913-1-git-send-email-ard.biesheuvel@linaro.org> References: <1458800900-11913-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [edk2] [PATCH 1/4] MdeModulePkg/PciHostBridgeDxe: remove unused but set variables X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Remove variables that are declared, assigned but never referenced. This fixes a warning emitted by GCC when -Wunused-but-set-variable is in effect. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c | 8 -------- 1 file changed, 8 deletions(-) -- 1.9.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Laszlo Ersek diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c index d5da6995af36..50f1407e7aea 100644 --- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c +++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c @@ -628,7 +628,6 @@ NotifyPhase ( PCI_ROOT_BRIDGE_INSTANCE *RootBridge; LIST_ENTRY *Link; EFI_PHYSICAL_ADDRESS BaseAddress; - UINT64 AddrLen; UINTN BitsOfAlignment; UINT64 Alignment; EFI_STATUS Status; @@ -735,7 +734,6 @@ NotifyPhase ( ASSERT (Index < TypeMax); ResNodeHandled[Index] = TRUE; - AddrLen = RootBridge->ResAllocNode[Index].Length; Alignment = RootBridge->ResAllocNode[Index].Alignment; BitsOfAlignment = LowBitSet64 (Alignment + 1); BaseAddress = MAX_UINT64; @@ -1110,9 +1108,6 @@ SetBusNumbers ( PCI_ROOT_BRIDGE_INSTANCE *RootBridge; EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *Descriptor; EFI_ACPI_END_TAG_DESCRIPTOR *End; - UINTN BusStart; - UINTN BusEnd; - UINTN BusLen; if (Configuration == NULL) { return EFI_INVALID_PARAMETER; @@ -1138,9 +1133,6 @@ SetBusNumbers ( ) { RootBridge = ROOT_BRIDGE_FROM_LINK (Link); if (RootBridgeHandle == RootBridge->Handle) { - BusStart = (UINTN) Descriptor->AddrRangeMin; - BusLen = (UINTN) Descriptor->AddrLen; - BusEnd = BusStart + BusLen - 1; if (Descriptor->AddrLen == 0) { return EFI_INVALID_PARAMETER;