lkml.org 
[lkml]   [2019]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 09/16] cnic: stop passing bogus gfp flags arguments to dma_alloc_coherent
    Date
    dma_alloc_coherent is not just the page allocator.  The only valid
    arguments to pass are either GFP_ATOMIC or GFP_ATOMIC with possible
    modifiers of __GFP_NORETRY or __GFP_NOWARN.

    Signed-off-by: Christoph Hellwig <hch@lst.de>
    ---
    drivers/net/ethernet/broadcom/cnic.c | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c
    index 57dc3cbff36e..bd1c993680e5 100644
    --- a/drivers/net/ethernet/broadcom/cnic.c
    +++ b/drivers/net/ethernet/broadcom/cnic.c
    @@ -1028,7 +1028,7 @@ 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);
    + GFP_KERNEL);
    if (!udev->l2_ring)
    return -ENOMEM;

    @@ -1036,7 +1036,7 @@ static int __cnic_alloc_uio_rings(struct cnic_uio_dev *udev, int pages)
    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);
    + GFP_KERNEL);
    if (!udev->l2_buf) {
    __cnic_free_uio_rings(udev);
    return -ENOMEM;
    --
    2.20.1
    \
     
     \ /
      Last update: 2019-06-14 15:50    [W:3.869 / U:0.424 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site