lkml.org 
[lkml]   [2009]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: linux-next: suspend tree build warnings
Hi,

On Wed, 19 Aug 2009, Andy Walls wrote:
>> Ick. struct device should _never_ be on the stack, why would this code
>> want to do such a thing?

When you are doing a thing it does not necessarily you know that you're
doing it.

> It appears that the state object is a dummy being used to detect and
> twiddle some identical chips on the i2c bus. The functions called only
> use the "i2c_adapter" and "cfg" member of the dummy state object, but
> those functions want that state object as an input argument.
>
> <obvious>
> The simplest fix is dynamic allocation of the dummy state object with
> kmalloc() and then to free it before exiting the function.
> </obvious>

Even more obvious: Fix the function with simpler code to do the same
thing.

I will try to fetch some time from somewhere to work on it.

--

Patrick
http://www.kernellabs.com/


\
 
 \ /
  Last update: 2009-08-20 09:37    [W:0.060 / U:1.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site