RDMA/efa: Use dma_set_mask_and_coherent to simplify code
Subsystems (2)
PATCH 1/1 RDMA/efa: Use dma_set_mask_and_coherent to simplify code
Use dma_set_mask_and_coherent() instead of pci_set_dma_mask() followed by a pci_set_consistent_dma_mask().
Reviewed-by Firas JahJah <[email protected]>
Reviewed-by Yossi Leybovich <[email protected]>
Signed-off-by Gal Pressman <[email protected]>
--- drivers/infiniband/hw/efa/efa_main.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)
drivers/infiniband/hw/efa/efa_main.c +2 -9
@@ -384,19 +384,12 @@ static int efa_device_init(struct efa_com_dev *edev, struct pci_dev *pdev)return err; } - err =pci_set_dma_mask (pdev,DMA_BIT_MASK (dma_width)); + err =dma_set_mask_and_coherent (&pdev->dev,DMA_BIT_MASK (dma_width));if (err) { -dev_err (&pdev->dev,"pci_set_dma_mask failed %d\n" , err); +dev_err (&pdev->dev,"dma_set_mask_and_coherent failed %d\n" , err);return err; } - err =pci_set_consistent_dma_mask (pdev,DMA_BIT_MASK (dma_width)); -if (err) { -dev_err (&pdev->dev, -"err_pci_set_consistent_dma_mask failed %d\n" , - err); -return err; - }dma_set_max_seg_size (&pdev->dev,UINT_MAX );return 0 ; }
base-commit: dd37d2f59eb839d51b988f6668ce5f0d533b23fd
Signature · 1 line
2.29.2
Quoted 9 lines · Gal Pressman
Use
dma_set_mask_and_coherent()instead ofpci_set_dma_mask()followed by apci_set_consistent_dma_mask().Reviewed-by Firas JahJah <[email protected]>Reviewed-by Yossi Leybovich <[email protected]>Signed-off-by Gal Pressman <[email protected]>--- drivers/infiniband/hw/efa/efa_main.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-)
Applied to for-next, thanks
Jason