Re: [PATCH net] net/mlx4: Avoid wrong virtual mappings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 27, 2016 at 9:32 AM, Leon Romanovsky <leon@xxxxxxxxxx> wrote:
> 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.

Thanks, I will fix this and send v1.

>
>> -     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;
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux