]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
sfc: don't call dma_supported
authorChristoph Hellwig <hch@lst.de>
Wed, 21 Oct 2015 22:13:24 +0000 (09:13 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 2 Nov 2015 03:54:09 +0000 (14:54 +1100)
dma_set_mask already checks for a supported DMA mask before updating it,
the call to dma_supported is redundant.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Solarflare linux maintainers <linux-net-drivers@solarflare.com>
Cc: Shradha Shah <sshah@solarflare.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/net/ethernet/sfc/efx.c

index 6e11ee6173ce566e97a61ad99e929cfc49895d84..d288f1c928de611455e44b515972b172340e4686 100644 (file)
@@ -1247,11 +1247,9 @@ static int efx_init_io(struct efx_nic *efx)
         * masks event though they reject 46 bit masks.
         */
        while (dma_mask > 0x7fffffffUL) {
-               if (dma_supported(&pci_dev->dev, dma_mask)) {
-                       rc = dma_set_mask_and_coherent(&pci_dev->dev, dma_mask);
-                       if (rc == 0)
-                               break;
-               }
+               rc = dma_set_mask_and_coherent(&pci_dev->dev, dma_mask);
+               if (rc == 0)
+                       break;
                dma_mask >>= 1;
        }
        if (rc) {