Re: [PATCH] PCI: pci-keystone-dw: remove some unused variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 06, 2017 at 04:56:44PM +0800, Shawn Lin wrote:
> We got the following warning:
> 
> drivers/pci/dwc/pci-keystone-dw.c: In function
> 'ks_dw_pcie_msi_irq_mask':
> 
> drivers/pci/dwc/pci-keystone-dw.c:171:24: warning: variable 'ks_pcie'
> set but not used [-Wunused-but-set-variable]
> 
> drivers/pci/dwc/pci-keystone-dw.c: In function
>   'ks_dw_pcie_msi_irq_unmask':
> 
> drivers/pci/dwc/pci-keystone-dw.c:194:24: warning: variable 'ks_pcie'
>   set but not used [-Wunused-but-set-variable
> 
> By looing into the code, ks_pcie and pci variables are never used.
> Remove them to silent the compile warning.
> 
> Signed-off-by: Shawn Lin <shawn.lin@xxxxxxxxxxxxxx>

Applied to pci/host-keystone for v4.14, thanks!

> ---
> 
>  drivers/pci/dwc/pci-keystone-dw.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/pci/dwc/pci-keystone-dw.c b/drivers/pci/dwc/pci-keystone-dw.c
> index 8bc626e..df60f487 100644
> --- a/drivers/pci/dwc/pci-keystone-dw.c
> +++ b/drivers/pci/dwc/pci-keystone-dw.c
> @@ -168,16 +168,12 @@ void ks_dw_pcie_msi_clear_irq(struct pcie_port *pp, int irq)
>  
>  static void ks_dw_pcie_msi_irq_mask(struct irq_data *d)
>  {
> -	struct keystone_pcie *ks_pcie;
>  	struct msi_desc *msi;
>  	struct pcie_port *pp;
> -	struct dw_pcie *pci;
>  	u32 offset;
>  
>  	msi = irq_data_get_msi_desc(d);
>  	pp = (struct pcie_port *) msi_desc_to_pci_sysdata(msi);
> -	pci = to_dw_pcie_from_pp(pp);
> -	ks_pcie = to_keystone_pcie(pci);
>  	offset = d->irq - irq_linear_revmap(pp->irq_domain, 0);
>  
>  	/* Mask the end point if PVM implemented */
> @@ -191,16 +187,12 @@ static void ks_dw_pcie_msi_irq_mask(struct irq_data *d)
>  
>  static void ks_dw_pcie_msi_irq_unmask(struct irq_data *d)
>  {
> -	struct keystone_pcie *ks_pcie;
>  	struct msi_desc *msi;
>  	struct pcie_port *pp;
> -	struct dw_pcie *pci;
>  	u32 offset;
>  
>  	msi = irq_data_get_msi_desc(d);
>  	pp = (struct pcie_port *) msi_desc_to_pci_sysdata(msi);
> -	pci = to_dw_pcie_from_pp(pp);
> -	ks_pcie = to_keystone_pcie(pci);
>  	offset = d->irq - irq_linear_revmap(pp->irq_domain, 0);
>  
>  	/* Mask the end point if PVM implemented */
> -- 
> 1.9.1
> 
> 



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux