lkml.org 
[lkml]   [2018]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 16/26] dmaengine: Convert to new IDA API
On Sun, Jun 24, 2018 at 09:57:45AM +0200, Lars-Peter Clausen wrote:
> > + int rc = ida_alloc(&dma_ida, GFP_KERNEL);
> >
> > + if (rc >= 0)
> > + device->dev_id = rc;
> > return rc;
>
> This used to return 0 on success, now it returns the ID. That wont work
> considering that it is used like this
>
> rc = get_dma_id(device);
> if (rc != 0) ...

Thanks! I changed it to this:

static int get_dma_id(struct dma_device *device)
{
int rc = ida_alloc(&dma_ida, GFP_KERNEL);

if (rc < 0)
return rc;
device->dev_id = rc;
return 0;
}

\
 
 \ /
  Last update: 2018-06-27 01:01    [W:0.179 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site