Re: [PATCH 1/2] fpga: Document when fpga_blah_free functions should be used

2018-08-14 Thread Alan Tull
On Thu, Jul 26, 2018 at 2:26 AM, Federico Vaga wrote: > Hi Alan, > > have you considered the possibility of having something like devm_fpga_[mgr| > bridge|region]_[create|free]() ? Like this, it will be obvious that 'struct > fpga_mgr' will be released automatically without reading any comment (bu

Re: [PATCH 1/2] fpga: Document when fpga_blah_free functions should be used

2018-07-26 Thread Federico Vaga
Hi Alan, have you considered the possibility of having something like devm_fpga_[mgr| bridge|region]_[create|free]() ? Like this, it will be obvious that 'struct fpga_mgr' will be released automatically without reading any comment (but the comment is still good), and you use devm_*_free() only t

[PATCH 1/2] fpga: Document when fpga_blah_free functions should be used

2018-07-25 Thread Alan Tull
Clarify when fpga_(mgr|bridge|region)_free functions should be used. The class's dev_release will handle cleanup when the device is released so once the mgr/brige/region has been successfully registered, it would be a bug to call fpga_(mgr|bridge|region)_free. Signed-off-by: Alan Tull Suggested-b