Linux-PCI Archive on lore.kernel.org
 help / color / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Hulk Robot <hulkci@huawei.com>, Tom Joseph <tjoseph@cadence.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Alan Douglas <adouglas@cadence.com>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH -next] PCI: cadence: Fix unused-but-set-variable warning
Date: Tue, 28 Jul 2020 11:36:30 +0100
Message-ID: <20200728103622.GA905@e121166-lin.cambridge.arm.com> (raw)
In-Reply-To: <20200725091945.75176-1-weiyongjun1@huawei.com>

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 <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  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) ||
> 

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-25  9:19 Wei Yongjun
2020-07-28 10:36 ` Lorenzo Pieralisi [this message]

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-all 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=20200728103622.GA905@e121166-lin.cambridge.arm.com \
    --to=lorenzo.pieralisi@arm.com \
    --cc=adouglas@cadence.com \
    --cc=bhelgaas@google.com \
    --cc=hulkci@huawei.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=tjoseph@cadence.com \
    --cc=weiyongjun1@huawei.com \
    /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

Linux-PCI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pci/0 linux-pci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pci linux-pci/ https://lore.kernel.org/linux-pci \
		linux-pci@vger.kernel.org
	public-inbox-index linux-pci

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pci


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git