From: Christophe JAILLET Date: Sun, 9 Jan 2022 18:25:05 +0000 (+0100) Subject: ice: Remove useless DMA-32 fallback configuration X-Git-Tag: core-urgent-2022-04-03~86^2~509^2~3 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=9c3e54a632637f27d98fb0ec0c44f7039925809d;p=users%2Fdwmw2%2Flinux.git ice: Remove useless DMA-32 fallback configuration As stated in [1], dma_set_mask() with a 64-bit mask never fails if dev->dma_mask is non-NULL. So, if it fails, the 32 bits case will also fail for the same reason. Simplify code and remove some dead code accordingly. [1]: https://lkml.org/lkml/2021/6/7/398 Signed-off-by: Christophe JAILLET Reviewed-by: Christoph Hellwig Reviewed-by: Alexander Lobakin Tested-by: Gurucharan G Signed-off-by: Tony Nguyen --- diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 30814435f7795..f46af3b340745 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -4459,8 +4459,6 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent) /* set up for high or low DMA */ err = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)); - if (err) - err = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)); if (err) { dev_err(dev, "DMA configuration failed: 0x%x\n", err); return err;