Skip to content

Commit a098397

Browse files
Ingo Molnardavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 45555c0 commit a098397

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/net/atlx/atl2.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,15 +644,13 @@ static int atl2_request_irq(struct atl2_adapter *adapter)
644644
int flags, err = 0;
645645

646646
flags = IRQF_SHARED;
647-
#ifdef CONFIG_PCI_MSI
648647
adapter->have_msi = true;
649648
err = pci_enable_msi(adapter->pdev);
650649
if (err)
651650
adapter->have_msi = false;
652651

653652
if (adapter->have_msi)
654653
flags &= ~IRQF_SHARED;
655-
#endif
656654

657655
return request_irq(adapter->pdev->irq, &atl2_intr, flags, netdev->name,
658656
netdev);

0 commit comments

Comments
 (0)