Re: [PATCH 16/26] dmaengine: Convert to new IDA API

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

 



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;
}

--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux