From patchwork Sat Jul 25 09:19:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1336212 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4BDKzH5J22z9sPf for ; Sat, 25 Jul 2020 19:10:19 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726593AbgGYJKS (ORCPT ); Sat, 25 Jul 2020 05:10:18 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:48648 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726583AbgGYJKS (ORCPT ); Sat, 25 Jul 2020 05:10:18 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 63500437AB6D9D7E53AA; Sat, 25 Jul 2020 17:09:58 +0800 (CST) Received: from kernelci-master.huawei.com (10.175.101.6) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.487.0; Sat, 25 Jul 2020 17:09:52 +0800 From: Wei Yongjun To: Hulk Robot , Tom Joseph , "Lorenzo Pieralisi" , Bjorn Helgaas , Alan Douglas CC: Wei Yongjun , Subject: [PATCH -next] PCI: cadence: Fix unused-but-set-variable warning Date: Sat, 25 Jul 2020 17:19:45 +0800 Message-ID: <20200725091945.75176-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.175.101.6] X-CFilter-Loop: Reflected Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Gcc report warning as followings: drivers/pci/controller/cadence/pcie-cadence-ep.c:390:33: warning: variable 'vec_ctrl' set but not used [-Wunused-but-set-variable] 390 | u32 tbl_offset, msg_data, reg, vec_ctrl; | ^~~~~~~~ This variable is not used so this commit removing it. Fixes: dae15ff2c7a9 ("PCI: cadence: Add MSI-X support to Endpoint driver") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- drivers/pci/controller/cadence/pcie-cadence-ep.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/pci/controller/cadence/pcie-cadence-ep.c b/drivers/pci/controller/cadence/pcie-cadence-ep.c index 87c76341eab4..ec1306da301f 100644 --- a/drivers/pci/controller/cadence/pcie-cadence-ep.c +++ b/drivers/pci/controller/cadence/pcie-cadence-ep.c @@ -387,7 +387,7 @@ static int cdns_pcie_ep_send_msix_irq(struct cdns_pcie_ep *ep, u8 fn, u16 interrupt_num) { u32 cap = CDNS_PCIE_EP_FUNC_MSIX_CAP_OFFSET; - u32 tbl_offset, msg_data, reg, vec_ctrl; + u32 tbl_offset, msg_data, reg; struct cdns_pcie *pcie = &ep->pcie; struct pci_epf_msix_tbl *msix_tbl; struct cdns_pcie_epf *epf; @@ -410,7 +410,6 @@ static int cdns_pcie_ep_send_msix_irq(struct cdns_pcie_ep *ep, u8 fn, msix_tbl = epf->epf_bar[bir]->addr + tbl_offset; msg_addr = msix_tbl[(interrupt_num - 1)].msg_addr; msg_data = msix_tbl[(interrupt_num - 1)].msg_data; - vec_ctrl = msix_tbl[(interrupt_num - 1)].vector_ctrl; /* Set the outbound region if needed. */ if (ep->irq_pci_addr != (msg_addr & ~pci_addr_mask) ||