Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1238910 > unrolled thread

[PATCH 11/15] sfc: don't call dma_supported

Started byChristoph Hellwig <hch@lst.de>
First post2015-10-03 17:30 +0200
Last post2015-10-05 17:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 11/15] sfc: don't call dma_supported Christoph Hellwig <hch@lst.de> - 2015-10-03 17:30 +0200
    Re: [PATCH 11/15] sfc: don't call dma_supported Bert Kenward <bkenward@solarflare.com> - 2015-10-05 17:20 +0200

#1238910 — [PATCH 11/15] sfc: don't call dma_supported

FromChristoph Hellwig <hch@lst.de>
Date2015-10-03 17:30 +0200
Subject[PATCH 11/15] sfc: don't call dma_supported
Message-ID<qfwV4-5K3-15@gated-at.bofh.it>
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>
---
 drivers/net/ethernet/sfc/efx.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 974637d..4abe886 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -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) {
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1239653

FromBert Kenward <bkenward@solarflare.com>
Date2015-10-05 17:20 +0200
Message-ID<qgfIv-2DV-33@gated-at.bofh.it>
In reply to#1238910
On 03/10/15 16:19, Christoph Hellwig wrote:
> 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>

Acked-by: Bert Kenward <bkenward@solarflare.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web