Skip to content

Commit bde3c8f

Browse files
tititiou36davem330
authored andcommitted
gve: Simplify code and axe the use of a deprecated API
The wrappers in include/linux/pci-dma-compat.h should go away. Replace 'pci_set_dma_mask/pci_set_consistent_dma_mask' by an equivalent and less verbose 'dma_set_mask_and_coherent()' call. Signed-off-by: Christophe JAILLET <[email protected]> Reviewed-by: Catherine Sullivan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 633fa66 commit bde3c8f

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

drivers/net/ethernet/google/gve/gve_main.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,19 +1477,12 @@ static int gve_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
14771477

14781478
pci_set_master(pdev);
14791479

1480-
err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
1480+
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
14811481
if (err) {
14821482
dev_err(&pdev->dev, "Failed to set dma mask: err=%d\n", err);
14831483
goto abort_with_pci_region;
14841484
}
14851485

1486-
err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
1487-
if (err) {
1488-
dev_err(&pdev->dev,
1489-
"Failed to set consistent dma mask: err=%d\n", err);
1490-
goto abort_with_pci_region;
1491-
}
1492-
14931486
reg_bar = pci_iomap(pdev, GVE_REGISTER_BAR, 0);
14941487
if (!reg_bar) {
14951488
dev_err(&pdev->dev, "Failed to map pci bar!\n");

0 commit comments

Comments
 (0)