Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+2 -4
+2 -4
drivers/net/ethernet/broadcom/cnic.c
··· 1027 1027 1028 1028 udev->l2_ring_size = pages * CNIC_PAGE_SIZE; 1029 1029 udev->l2_ring = dma_alloc_coherent(&udev->pdev->dev, udev->l2_ring_size, 1030 - &udev->l2_ring_map, 1031 - GFP_KERNEL | __GFP_COMP); 1030 + &udev->l2_ring_map, GFP_KERNEL); 1032 1031 if (!udev->l2_ring) 1033 1032 return -ENOMEM; 1034 1033 1035 1034 udev->l2_buf_size = (cp->l2_rx_ring_size + 1) * cp->l2_single_buf_size; 1036 1035 udev->l2_buf_size = CNIC_PAGE_ALIGN(udev->l2_buf_size); 1037 1036 udev->l2_buf = dma_alloc_coherent(&udev->pdev->dev, udev->l2_buf_size, 1038 - &udev->l2_buf_map, 1039 - GFP_KERNEL | __GFP_COMP); 1037 + &udev->l2_buf_map, GFP_KERNEL); 1040 1038 if (!udev->l2_buf) { 1041 1039 __cnic_free_uio_rings(udev); 1042 1040 return -ENOMEM;