Re: [PATCH v9 08/12] device core: Introduce DMA range map, supplanting dma_pfn_offset

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

 



On Tue, Jul 28, 2020 at 02:24:51PM -0400, Jim Quinlan wrote:
> I started using devm_kcalloc() but at least two reviewers convinced me
> to just use kcalloc().  In addition, when I was using devm_kcalloc()
> it was awkward because 'dev' is not available to this function.
> 
> It comes down to whether unbind/binding the device N times is actually
> a reasonable usage.  As for my experience I've seen two cases: (1) my
> overnight "bind/unbind the PCIe RC driver" script, and we have a
> customer who does an unbind/bind as a hail mary to bring back life to
> their dead EP device.  If the latter case happens repeatedly, there
> are bigger problems.

We can't just leak the allocations.  Do you have a pointer to the
arguments against managed resources?  I'm generally not a huge fan
of the managed resources, but for a case like this they actually seem
useful.  If we don't use the managed resources we'll at leat need
to explicitly free the resources when freeing the device.
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux