Re: [PATCH] PCI: rcar: don't shadow the 'irq' variable

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

 



On Sun, Mar 17, 2019 at 10:34:45AM +0100, Wolfram Sang wrote:
> sparse rightfully says:
> drivers/pci/controller/pcie-rcar.c:741:30: warning: symbol 'irq' shadows an earlier one
> 
> It doesn't affect the current code. But fix it now to avoid future
> surprises and for good coding style.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>

Reviewed-by: Simon Horman <horms+renesas@xxxxxxxxxxxx>

> ---
> 
> Only build tested.
> 
>  drivers/pci/controller/pcie-rcar.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/pci/controller/pcie-rcar.c b/drivers/pci/controller/pcie-rcar.c
> index 7002e9ad0b81..f513058e3a70 100644
> --- a/drivers/pci/controller/pcie-rcar.c
> +++ b/drivers/pci/controller/pcie-rcar.c
> @@ -738,15 +738,15 @@ static irqreturn_t rcar_pcie_msi_irq(int irq, void *data)
>  
>  	while (reg) {
>  		unsigned int index = find_first_bit(&reg, 32);
> -		unsigned int irq;
> +		unsigned int msi_irq;
>  
>  		/* clear the interrupt */
>  		rcar_pci_write_reg(pcie, 1 << index, PCIEMSIFR);
>  
> -		irq = irq_find_mapping(msi->domain, index);
> -		if (irq) {
> +		msi_irq = irq_find_mapping(msi->domain, index);
> +		if (msi_irq) {
>  			if (test_bit(index, msi->used))
> -				generic_handle_irq(irq);
> +				generic_handle_irq(msi_irq);
>  			else
>  				dev_info(dev, "unhandled MSI\n");
>  		} else {
> -- 
> 2.19.1
> 



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux