From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87F52C433E1 for ; Tue, 28 Jul 2020 10:36:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 549C520672 for ; Tue, 28 Jul 2020 10:36:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728566AbgG1Kgo (ORCPT ); Tue, 28 Jul 2020 06:36:44 -0400 Received: from foss.arm.com ([217.140.110.172]:60560 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728424AbgG1Kgo (ORCPT ); Tue, 28 Jul 2020 06:36:44 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CD0231FB; Tue, 28 Jul 2020 03:36:43 -0700 (PDT) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E872B3F66E; Tue, 28 Jul 2020 03:36:42 -0700 (PDT) Date: Tue, 28 Jul 2020 11:36:30 +0100 From: Lorenzo Pieralisi To: Wei Yongjun Cc: Hulk Robot , Tom Joseph , Bjorn Helgaas , Alan Douglas , linux-pci@vger.kernel.org Subject: Re: [PATCH -next] PCI: cadence: Fix unused-but-set-variable warning Message-ID: <20200728103622.GA905@e121166-lin.cambridge.arm.com> References: <20200725091945.75176-1-weiyongjun1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200725091945.75176-1-weiyongjun1@huawei.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Sat, Jul 25, 2020 at 05:19:45PM +0800, Wei Yongjun wrote: > 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(-) Squashed in the original commit, thanks. Lorenzo > 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) || >