Commit a098397d562e2ce5aca7b9b007a4954d88ef8f5e
Committed by
David S. Miller
1 parent
45555c0ed4
Exists in
master
and in
7 other branches
atlx: fix warning in drivers/net/atlx/atl2.c
fix this warning: drivers/net/atlx/atl2.c: In function ‘atl2_request_irq’: drivers/net/atlx/atl2.c:644: warning: unused variable ‘err’ 'err' is unused in the !CONFIG_PCI_MSI case. Instead of further increasing the #ifdeffery in this function, restructure the code a bit and get rid of the #ifdef. This relies on the fact that pci_enable_msi() will always fail in the !CONFIG_PCI_MSI case. There should be no change in driver behavior. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 0 additions and 2 deletions Side-by-side Diff
drivers/net/atlx/atl2.c
... | ... | @@ -644,7 +644,6 @@ |
644 | 644 | int flags, err = 0; |
645 | 645 | |
646 | 646 | flags = IRQF_SHARED; |
647 | -#ifdef CONFIG_PCI_MSI | |
648 | 647 | adapter->have_msi = true; |
649 | 648 | err = pci_enable_msi(adapter->pdev); |
650 | 649 | if (err) |
... | ... | @@ -652,7 +651,6 @@ |
652 | 651 | |
653 | 652 | if (adapter->have_msi) |
654 | 653 | flags &= ~IRQF_SHARED; |
655 | -#endif | |
656 | 654 | |
657 | 655 | return request_irq(adapter->pdev->irq, &atl2_intr, flags, netdev->name, |
658 | 656 | netdev); |