cnic: don't pass bogus GFP_ flags to dma_alloc_coherent
authorChristoph Hellwig <hch@lst.de>
Wed, 9 Nov 2022 07:21:04 +0000 (08:21 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 21 Nov 2022 08:36:08 +0000 (09:36 +0100)
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>
drivers/net/ethernet/broadcom/cnic.c

index 2198e35..ad74b48 100644 (file)
@@ -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;