mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 15:29:16 +00:00
cnic: don't pass bogus GFP_ flags to dma_alloc_coherent
dma_alloc_coherent is an opaque allocator that only uses the GFP_ flags for allocation context control. Don't pass __GFP_COMP which makes no sense for an allocation that can't in any way be converted to a page pointer. Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
2fce26a15f
commit
bb73955c0b
@ -1027,16 +1027,14 @@ static int __cnic_alloc_uio_rings(struct cnic_uio_dev *udev, int pages)
|
||||
|
||||
udev->l2_ring_size = pages * CNIC_PAGE_SIZE;
|
||||
udev->l2_ring = dma_alloc_coherent(&udev->pdev->dev, udev->l2_ring_size,
|
||||
&udev->l2_ring_map,
|
||||
GFP_KERNEL | __GFP_COMP);
|
||||
&udev->l2_ring_map, GFP_KERNEL);
|
||||
if (!udev->l2_ring)
|
||||
return -ENOMEM;
|
||||
|
||||
udev->l2_buf_size = (cp->l2_rx_ring_size + 1) * cp->l2_single_buf_size;
|
||||
udev->l2_buf_size = CNIC_PAGE_ALIGN(udev->l2_buf_size);
|
||||
udev->l2_buf = dma_alloc_coherent(&udev->pdev->dev, udev->l2_buf_size,
|
||||
&udev->l2_buf_map,
|
||||
GFP_KERNEL | __GFP_COMP);
|
||||
&udev->l2_buf_map, GFP_KERNEL);
|
||||
if (!udev->l2_buf) {
|
||||
__cnic_free_uio_rings(udev);
|
||||
return -ENOMEM;
|
||||
|
Loading…
x
Reference in New Issue
Block a user