Message ID | 20190317093445.7746-1-wsa+renesas@sang-engineering.com (mailing list archive) |
---|---|
State | Accepted, archived |
Commit | a27beb5820d1a52b1e2863a4ae5545a1dd4ab35a |
Delegated to: | Lorenzo Pieralisi |
Headers | show |
Series | PCI: rcar: don't shadow the 'irq' variable | expand |
On Sun, Mar 17, 2019 at 10:35 AM Wolfram Sang <wsa+renesas@sang-engineering.com> 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@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Gr{oetje,eeting}s, Geert
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@sang-engineering.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> > --- > > 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 >
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@sang-engineering.com> > --- > > 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 >
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 {
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@sang-engineering.com> --- Only build tested. drivers/pci/controller/pcie-rcar.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)