提交 8722b8fb 编写于 作者: C Christoph Hellwig 提交者: Linus Torvalds

sfc: don't call dma_supported

dma_set_mask already checks for a supported DMA mask before updating it,
the call to dma_supported is redundant.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Cc: Solarflare linux maintainers <linux-net-drivers@solarflare.com>
Cc: Shradha Shah <sshah@solarflare.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 0dcc4a59
...@@ -1247,11 +1247,9 @@ static int efx_init_io(struct efx_nic *efx) ...@@ -1247,11 +1247,9 @@ static int efx_init_io(struct efx_nic *efx)
* masks event though they reject 46 bit masks. * masks event though they reject 46 bit masks.
*/ */
while (dma_mask > 0x7fffffffUL) { while (dma_mask > 0x7fffffffUL) {
if (dma_supported(&pci_dev->dev, dma_mask)) { rc = dma_set_mask_and_coherent(&pci_dev->dev, dma_mask);
rc = dma_set_mask_and_coherent(&pci_dev->dev, dma_mask); if (rc == 0)
if (rc == 0) break;
break;
}
dma_mask >>= 1; dma_mask >>= 1;
} }
if (rc) { if (rc) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册