Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <christophe.jaillet@wanadoo.fr>
Reviewed-by: Catherine Sullivan <csully@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Christophe JAILLET and committed by
David S. Miller
bde3c8ff 633fa666

+1 -8
+1 -8
drivers/net/ethernet/google/gve/gve_main.c
··· 1477 1477 1478 1478 pci_set_master(pdev); 1479 1479 1480 - err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64)); 1480 + err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); 1481 1481 if (err) { 1482 1482 dev_err(&pdev->dev, "Failed to set dma mask: err=%d\n", err); 1483 - goto abort_with_pci_region; 1484 - } 1485 - 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 1483 goto abort_with_pci_region; 1491 1484 } 1492 1485