提交 a2d0abc6 编写于 作者: J Joe Perches 提交者: Linus Torvalds

micrel: use pci_zalloc_consistent

Remove the now unnecessary memset too.
Signed-off-by: NJoe Perches <joe@perches.com>
Acked-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 12fe08b2
...@@ -4409,14 +4409,13 @@ static int ksz_alloc_desc(struct dev_info *adapter) ...@@ -4409,14 +4409,13 @@ static int ksz_alloc_desc(struct dev_info *adapter)
DESC_ALIGNMENT; DESC_ALIGNMENT;
adapter->desc_pool.alloc_virt = adapter->desc_pool.alloc_virt =
pci_alloc_consistent( pci_zalloc_consistent(adapter->pdev,
adapter->pdev, adapter->desc_pool.alloc_size, adapter->desc_pool.alloc_size,
&adapter->desc_pool.dma_addr); &adapter->desc_pool.dma_addr);
if (adapter->desc_pool.alloc_virt == NULL) { if (adapter->desc_pool.alloc_virt == NULL) {
adapter->desc_pool.alloc_size = 0; adapter->desc_pool.alloc_size = 0;
return 1; return 1;
} }
memset(adapter->desc_pool.alloc_virt, 0, adapter->desc_pool.alloc_size);
/* Align to the next cache line boundary. */ /* Align to the next cache line boundary. */
offset = (((ulong) adapter->desc_pool.alloc_virt % DESC_ALIGNMENT) ? offset = (((ulong) adapter->desc_pool.alloc_virt % DESC_ALIGNMENT) ?
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册