summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2014-05-25 18:50:06 (GMT)
committerGrant Likely <grant.likely@linaro.org>2014-05-27 11:13:34 (GMT)
commit08cf78ed41feaa21017487bad0a5a405c6cede43 (patch)
tree14a8a16ec61dc5f604c3b8abfc87aa58afe76a5d
parentad69674e73a18dc3a8da557f4059ccf9389531a5 (diff)
downloadlinux-08cf78ed41feaa21017487bad0a5a405c6cede43.tar.xz
of_pci_irq: kill useless variable in of_irq_parse_pci()
The 'lspec' variable only caused pointless promotions from u8 to u32 on each loop iteration, while it's enough to promote only once, after the loop. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Grant Likely <grant.likely@linaro.org>
-rw-r--r--drivers/of/of_pci_irq.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/of/of_pci_irq.c b/drivers/of/of_pci_irq.c
index 7e4e214..1710d9d 100644
--- a/drivers/of/of_pci_irq.c
+++ b/drivers/of/of_pci_irq.c
@@ -18,7 +18,6 @@ int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq
{
struct device_node *dn, *ppnode;
struct pci_dev *ppdev;
- u32 lspec;
__be32 laddr[3];
u8 pin;
int rc;
@@ -45,7 +44,6 @@ int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq
return -ENODEV;
/* Now we walk up the PCI tree */
- lspec = pin;
for (;;) {
/* Get the pci_dev of our parent */
ppdev = pdev->bus->self;
@@ -79,13 +77,13 @@ int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq
/* We can only get here if we hit a P2P bridge with no node,
* let's do standard swizzling and try again
*/
- lspec = pci_swizzle_interrupt_pin(pdev, lspec);
+ pin = pci_swizzle_interrupt_pin(pdev, pin);
pdev = ppdev;
}
out_irq->np = ppnode;
out_irq->args_count = 1;
- out_irq->args[0] = lspec;
+ out_irq->args[0] = pin;
laddr[0] = cpu_to_be32((pdev->bus->number << 16) | (pdev->devfn << 8));
laddr[1] = laddr[2] = cpu_to_be32(0);
return of_irq_parse_raw(laddr, out_irq);