On Mon, Apr 25, 2016 at 04:34:47PM +0300, Haggai Abramovsky wrote:
> -int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
> -                struct mlx4_buf *buf, gfp_t gfp)
> +static int mlx4_buf_direct_alloc(struct mlx4_dev *dev, int size,
> +                              struct mlx4_buf *buf, gfp_t gfp)
>  {
> -     dma_addr_t t;
> +             dma_addr_t t;
>  

You have wrong indentation in whole this function.

> -     if (size <= max_direct) {
>               buf->nbufs        = 1;
>               buf->npages       = 1;
>               buf->page_shift   = get_order(size) + PAGE_SHIFT;
> -             buf->direct.buf   = dma_alloc_coherent(&dev->persist->pdev->dev,
> -                                                    size, &t, gfp);
> +             buf->direct.buf   =
> +                     dma_zalloc_coherent(&dev->persist->pdev->dev,
> +                                         size, &t, gfp);
>               if (!buf->direct.buf)
>                       return -ENOMEM;

Attachment: signature.asc
Description: Digital signature

Reply via email to