Le 29/11/2020 à 22:46, Heiner Kallweit a écrit :
Am 29.11.2020 um 22:17 schrieb Christophe JAILLET:
@@ -1817,17 +1817,17 @@ static int mlxsw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
goto err_pci_request_regions;
}
- err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
+ err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
Using dma_set_mask_and_coherent() would be better here.
if (!err) {
- err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
+ err = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
if (err) {
This check isn't needed, see comment at definition of
dma_set_mask_and_coherent().
Hi,
Correct, but I didn't want to mix several things in the same commit.
This one is dedicated to automatically generated changes done with
coccinelle.
I plan to have another set of such clean-ups once "wrappers in
include/linux/pci-dma-compat.h are gone"
However, if it is prefered to have only one patch, I can resubmit.
CJ