Re: [PATCHv2] driver core/platform: don't leak memory allocated for dma_mask

2014-01-14 Thread Greg Kroah-Hartman
On Tue, Jan 14, 2014 at 11:36:48AM +0100, Uwe Kleine-König wrote: > > I will try to get some figure on the number of platform_device > > registered with a dmamask versus without a dmamask: adding the u64 to > > all platform_object might cost more memory than the extra code (1 branch > > and a funct

Re: [PATCHv2] driver core/platform: don't leak memory allocated for dma_mask

2014-01-14 Thread Uwe Kleine-König
Hello Yann, On Tue, Jan 14, 2014 at 10:57:33AM +0100, Yann Droneaud wrote: > Le mardi 14 janvier 2014 à 09:19 +0100, Uwe Kleine-König a écrit : > > On Tue, Jan 14, 2014 at 08:18:29AM +0100, Yann Droneaud wrote: > > > Since commit 01dcc60a7cb8, platform_device_register_full() is > > > available to

Re: [PATCHv2] driver core/platform: don't leak memory allocated for dma_mask

2014-01-14 Thread Yann Droneaud
Hi Uwe, Le mardi 14 janvier 2014 à 09:19 +0100, Uwe Kleine-König a écrit : > On Tue, Jan 14, 2014 at 08:18:29AM +0100, Yann Droneaud wrote: > > Since commit 01dcc60a7cb8, platform_device_register_full() is > > available to allocate and register a platform device. > > > > If a dma_mask is provided

Re: [PATCHv2] driver core/platform: don't leak memory allocated for dma_mask

2014-01-14 Thread Uwe Kleine-König
Hello Yann, On Tue, Jan 14, 2014 at 08:18:29AM +0100, Yann Droneaud wrote: > Since commit 01dcc60a7cb8, platform_device_register_full() is > available to allocate and register a platform device. > > If a dma_mask is provided as part of platform_device_info, > platform_device_register_full() alloc

[PATCHv2] driver core/platform: don't leak memory allocated for dma_mask

2014-01-13 Thread Yann Droneaud
Since commit 01dcc60a7cb8, platform_device_register_full() is available to allocate and register a platform device. If a dma_mask is provided as part of platform_device_info, platform_device_register_full() allocate memory for a u64 using kmalloc(). A comment in the code state that "[t]his memory