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

2019-03-29 Thread Lorenzo Pieralisi
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 
> ---
> 
> Only build tested.
> 
>  drivers/pci/controller/pcie-rcar.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)

Applied to pci/rcar for v5.2, thanks.

Lorenzo

> 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(®, 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
> 


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

2019-03-18 Thread Simon Horman
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 

Reviewed-by: Simon Horman 

> ---
> 
> 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(®, 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
> 


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

2019-03-18 Thread Geert Uytterhoeven
On Sun, Mar 17, 2019 at 10:35 AM 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 

Reviewed-by: Geert Uytterhoeven 

Gr{oetje,eeting}s,

Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


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

2019-03-17 Thread Wolfram Sang
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 
---

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(®, 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