Re: [PATCH 1/4] resource: add a not device managed request_free_mem_region variant

2019-08-19 Thread Dan Williams
On Mon, Aug 19, 2019 at 7:26 PM Christoph Hellwig wrote: > > On Mon, Aug 19, 2019 at 06:28:30PM -0700, Dan Williams wrote: > > > > Previously we would loudly crash if someone passed NULL to > > devm_request_free_mem_region(), but now it will silently work and the > > result will leak. Perhaps

Re: [PATCH 1/4] resource: add a not device managed request_free_mem_region variant

2019-08-19 Thread Christoph Hellwig
On Mon, Aug 19, 2019 at 06:28:30PM -0700, Dan Williams wrote: > > Previously we would loudly crash if someone passed NULL to > devm_request_free_mem_region(), but now it will silently work and the > result will leak. Perhaps this wants a: We'd still instantly crash due to the dev_name

Re: [PATCH 1/4] resource: add a not device managed request_free_mem_region variant

2019-08-19 Thread Dan Williams
On Sun, Aug 18, 2019 at 2:10 AM Christoph Hellwig wrote: > > Factor out the guts of devm_request_free_mem_region so that we can > implement both a device managed and a manually release version as > tiny wrappers around it. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Ira Weiny > --- >

[PATCH 1/4] resource: add a not device managed request_free_mem_region variant

2019-08-18 Thread Christoph Hellwig
Factor out the guts of devm_request_free_mem_region so that we can implement both a device managed and a manually release version as tiny wrappers around it. Signed-off-by: Christoph Hellwig Reviewed-by: Ira Weiny --- include/linux/ioport.h | 2 ++ kernel/resource.c | 45

Re: [PATCH 1/4] resource: add a not device managed request_free_mem_region variant

2019-08-18 Thread Christoph Hellwig
On Fri, Aug 16, 2019 at 02:01:34PM -0700, Andrew Morton wrote: > On Fri, 16 Aug 2019 08:54:31 +0200 Christoph Hellwig wrote: > > > Just add a simple macro that passes a NULL dev argument to > > dev_request_free_mem_region, and call request_mem_region in the > > function for that particular case.

Re: [PATCH 1/4] resource: add a not device managed request_free_mem_region variant

2019-08-16 Thread Andrew Morton
On Fri, 16 Aug 2019 08:54:31 +0200 Christoph Hellwig wrote: > Just add a simple macro that passes a NULL dev argument to > dev_request_free_mem_region, and call request_mem_region in the > function for that particular case. Nit: > +struct resource *request_free_mem_region(struct resource

[PATCH 1/4] resource: add a not device managed request_free_mem_region variant

2019-08-16 Thread Christoph Hellwig
Just add a simple macro that passes a NULL dev argument to dev_request_free_mem_region, and call request_mem_region in the function for that particular case. Signed-off-by: Christoph Hellwig --- include/linux/ioport.h | 2 ++ kernel/resource.c | 45