Skip to content

Commit f7eaf7f

Browse files
author
Nilesh Javali
committed
cnic: don't pass bogus GFP_ flags to dma_alloc_coherent
Bugzilla: https://bugzilla.redhat.com/2164967 Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git commit bb73955 Author: Christoph Hellwig <hch@lst.de> Date: Wed Nov 9 08:21:04 2022 +0100 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> Signed-off-by: Nilesh Javali <njavali@redhat.com>
1 parent 29e00ce commit f7eaf7f

File tree

1 file changed

+2
-4
lines changed
  • drivers/net/ethernet/broadcom

1 file changed

+2
-4
lines changed

drivers/net/ethernet/broadcom/cnic.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,16 +1027,14 @@ static int __cnic_alloc_uio_rings(struct cnic_uio_dev *udev, int pages)
10271027

10281028
udev->l2_ring_size = pages * CNIC_PAGE_SIZE;
10291029
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);
10321031
if (!udev->l2_ring)
10331032
return -ENOMEM;
10341033

10351034
udev->l2_buf_size = (cp->l2_rx_ring_size + 1) * cp->l2_single_buf_size;
10361035
udev->l2_buf_size = CNIC_PAGE_ALIGN(udev->l2_buf_size);
10371036
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);
10401038
if (!udev->l2_buf) {
10411039
__cnic_free_uio_rings(udev);
10421040
return -ENOMEM;

0 commit comments

Comments
 (0)