Re: Freeing of dev->p

2014-04-08 Thread Grant Likely
On Wed, 8 Jan 2014 08:56:28 -0800, Greg Kroah-Hartman wrote: > On Wed, Jan 08, 2014 at 04:40:58PM +0100, Jean Delvare wrote: > > Hi Greg, hi all, > > > > A memory leak has been reported to me: > > http://marc.info/?l=linux-i2c&m=138779165123331&w=2 > > > > The leak is in i801_probe, caused by a

Re: Freeing of dev->p

2014-01-25 Thread Greg Kroah-Hartman
On Wed, Jan 22, 2014 at 08:29:11AM +0100, Jean Delvare wrote: > Hi Greg, > > On Fri, 10 Jan 2014 07:24:02 -0800, Greg Kroah-Hartman wrote: > > On Fri, Jan 10, 2014 at 03:39:07PM +0100, Jean Delvare wrote: > > > (...) > > > Then I suppose we could inline both functions > > > again, for performance.

Re: Freeing of dev->p

2014-01-21 Thread Jean Delvare
Hi Greg, On Fri, 10 Jan 2014 07:24:02 -0800, Greg Kroah-Hartman wrote: > On Fri, Jan 10, 2014 at 03:39:07PM +0100, Jean Delvare wrote: > > (...) > > Then I suppose we could inline both functions > > again, for performance. Well, put in short, really revering > > b4028437876866aba4747a655ede00f8920

Re: Freeing of dev->p

2014-01-10 Thread Jean Delvare
Hi Greg, On Fri, 10 Jan 2014 07:24:02 -0800, Greg Kroah-Hartman wrote: > On Fri, Jan 10, 2014 at 03:39:07PM +0100, Jean Delvare wrote: > > + * @driver_data: Private pointer for driver specific info. Will turn into > > a > > + * list soon. > > Ah, this comment reminds me of why I origina

Re: Freeing of dev->p

2014-01-10 Thread Greg Kroah-Hartman
On Fri, Jan 10, 2014 at 03:39:07PM +0100, Jean Delvare wrote: > + * @driver_data: Private pointer for driver specific info. Will turn into a > + * list soon. Ah, this comment reminds me of why I originally did this. I was working on moving for a way to have multiple drivers bound to th

Re: Freeing of dev->p

2014-01-10 Thread Jean Delvare
Hi Greg, On Thu, 9 Jan 2014 20:18:53 -0800, Greg Kroah-Hartman wrote: > On Wed, Jan 08, 2014 at 09:33:30PM +0100, Jean Delvare wrote: > > I consider allocating memory in dev_set_drvdata() very misleading, I > > don't think we should keep doing that. > > I had to add that later on when it was foun

Re: Freeing of dev->p

2014-01-09 Thread Greg Kroah-Hartman
On Wed, Jan 08, 2014 at 09:33:30PM +0100, Jean Delvare wrote: > On Wed, 8 Jan 2014 08:56:28 -0800, Greg Kroah-Hartman wrote: > > On Wed, Jan 08, 2014 at 04:40:58PM +0100, Jean Delvare wrote: > > > Hi Greg, hi all, > > > > > > A memory leak has been reported to me: > > > http://marc.info/?l=linux-i

Re: Freeing of dev->p

2014-01-08 Thread Jean Delvare
On Wed, 8 Jan 2014 08:56:28 -0800, Greg Kroah-Hartman wrote: > On Wed, Jan 08, 2014 at 04:40:58PM +0100, Jean Delvare wrote: > > Hi Greg, hi all, > > > > A memory leak has been reported to me: > > http://marc.info/?l=linux-i2c&m=138779165123331&w=2 > > > > The leak is in i801_probe, caused by an

Re: Freeing of dev->p

2014-01-08 Thread Greg Kroah-Hartman
On Wed, Jan 08, 2014 at 04:40:58PM +0100, Jean Delvare wrote: > Hi Greg, hi all, > > A memory leak has been reported to me: > http://marc.info/?l=linux-i2c&m=138779165123331&w=2 > > The leak is in i801_probe, caused by an early call to > i2c_set_adapdata() which in turn calls dev_set_drvdata() wh

Freeing of dev->p

2014-01-08 Thread Jean Delvare
Hi Greg, hi all, A memory leak has been reported to me: http://marc.info/?l=linux-i2c&m=138779165123331&w=2 The leak is in i801_probe, caused by an early call to i2c_set_adapdata() which in turn calls dev_set_drvdata() which allocates some memory in device_private_init(). That memory is only free