* linux-next: suspend tree build warnings
@ 2009-08-19 7:24 Stephen Rothwell
2009-08-19 21:38 ` Rafael J. Wysocki
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2009-08-19 7:24 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: linux-next, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 731 bytes --]
Hi Rafael,
Today's linux-next build (x86_64 allmodconfig) produced these warnings:
drivers/media/dvb/frontends/dib7000p.c: In function ‘dib7000p_i2c_enumeration’:
drivers/media/dvb/frontends/dib7000p.c:1315: warning: the frame size of 2256 bytes is larger than 2048 bytes
drivers/media/dvb/frontends/dib3000mc.c: In function ‘dib3000mc_i2c_enumeration’:
drivers/media/dvb/frontends/dib3000mc.c:853: warning: the frame size of 2160 bytes is larger than 2048 bytes
Introduced by commit 99307958cc9c1b0b2e0dad4bbefdafaf9ac5a681 ("PM:
Introduce core framework for run-time PM of I/O devices (rev. 17)").
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: suspend tree build warnings
2009-08-19 7:24 linux-next: suspend tree build warnings Stephen Rothwell
@ 2009-08-19 21:38 ` Rafael J. Wysocki
2009-08-19 23:36 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2009-08-19 21:38 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-next, linux-kernel, pm list, Alan Stern,
Mauro Carvalho Chehab, linux-media
On Wednesday 19 August 2009, Stephen Rothwell wrote:
> Hi Rafael,
Hi,
> Today's linux-next build (x86_64 allmodconfig) produced these warnings:
>
> drivers/media/dvb/frontends/dib7000p.c: In function ‘dib7000p_i2c_enumeration’:
> drivers/media/dvb/frontends/dib7000p.c:1315: warning: the frame size of 2256 bytes is larger than 2048 bytes
> drivers/media/dvb/frontends/dib3000mc.c: In function ‘dib3000mc_i2c_enumeration’:
> drivers/media/dvb/frontends/dib3000mc.c:853: warning: the frame size of 2160 bytes is larger than 2048 bytes
>
> Introduced by commit 99307958cc9c1b0b2e0dad4bbefdafaf9ac5a681 ("PM:
> Introduce core framework for run-time PM of I/O devices (rev. 17)").
Well.
This commit increases the size of struct device quite a bit and both of the
drivers above create a "state" object on the stack that contains struct device
among other things.
I think they should allocate these objects using kmalloc() and I don't know
what I can do about this, really. Maybe except for modifying the drivers to
use kmalloc().
Thanks,
Rafael
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: suspend tree build warnings
2009-08-19 21:38 ` Rafael J. Wysocki
@ 2009-08-19 23:36 ` Greg KH
2009-08-20 0:44 ` Andy Walls
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2009-08-19 23:36 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Stephen Rothwell, linux-next, linux-kernel, pm list, Alan Stern,
Mauro Carvalho Chehab, linux-media
On Wed, Aug 19, 2009 at 11:38:03PM +0200, Rafael J. Wysocki wrote:
> On Wednesday 19 August 2009, Stephen Rothwell wrote:
> > Hi Rafael,
>
> Hi,
>
> > Today's linux-next build (x86_64 allmodconfig) produced these warnings:
> >
> > drivers/media/dvb/frontends/dib7000p.c: In function ‘dib7000p_i2c_enumeration’:
> > drivers/media/dvb/frontends/dib7000p.c:1315: warning: the frame size of 2256 bytes is larger than 2048 bytes
> > drivers/media/dvb/frontends/dib3000mc.c: In function ‘dib3000mc_i2c_enumeration’:
> > drivers/media/dvb/frontends/dib3000mc.c:853: warning: the frame size of 2160 bytes is larger than 2048 bytes
> >
> > Introduced by commit 99307958cc9c1b0b2e0dad4bbefdafaf9ac5a681 ("PM:
> > Introduce core framework for run-time PM of I/O devices (rev. 17)").
>
> Well.
>
> This commit increases the size of struct device quite a bit and both of the
> drivers above create a "state" object on the stack that contains struct device
> among other things.
Ick. struct device should _never_ be on the stack, why would this code
want to do such a thing?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: suspend tree build warnings
2009-08-19 23:36 ` Greg KH
@ 2009-08-20 0:44 ` Andy Walls
2009-08-20 7:01 ` Patrick Boettcher
0 siblings, 1 reply; 5+ messages in thread
From: Andy Walls @ 2009-08-20 0:44 UTC (permalink / raw)
To: Greg KH
Cc: Rafael J. Wysocki, Stephen Rothwell, linux-next, linux-kernel,
pm list, Alan Stern, Mauro Carvalho Chehab, linux-media
On Wed, 2009-08-19 at 16:36 -0700, Greg KH wrote:
> On Wed, Aug 19, 2009 at 11:38:03PM +0200, Rafael J. Wysocki wrote:
> > On Wednesday 19 August 2009, Stephen Rothwell wrote:
> > > Hi Rafael,
> >
> > Hi,
> >
> > > Today's linux-next build (x86_64 allmodconfig) produced these warnings:
> > >
> > > drivers/media/dvb/frontends/dib7000p.c: In function ‘dib7000p_i2c_enumeration’:
> > > drivers/media/dvb/frontends/dib7000p.c:1315: warning: the frame size of 2256 bytes is larger than 2048 bytes
> > > drivers/media/dvb/frontends/dib3000mc.c: In function ‘dib3000mc_i2c_enumeration’:
> > > drivers/media/dvb/frontends/dib3000mc.c:853: warning: the frame size of 2160 bytes is larger than 2048 bytes
> > >
> > > Introduced by commit 99307958cc9c1b0b2e0dad4bbefdafaf9ac5a681 ("PM:
> > > Introduce core framework for run-time PM of I/O devices (rev. 17)").
> >
> > Well.
> >
> > This commit increases the size of struct device quite a bit and both of the
> > drivers above create a "state" object on the stack that contains struct device
> > among other things.
>
> Ick. struct device should _never_ be on the stack, why would this code
> want to do such a thing?
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>
Regards,
Andy
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: linux-next: suspend tree build warnings
2009-08-20 0:44 ` Andy Walls
@ 2009-08-20 7:01 ` Patrick Boettcher
0 siblings, 0 replies; 5+ messages in thread
From: Patrick Boettcher @ 2009-08-20 7:01 UTC (permalink / raw)
To: Andy Walls
Cc: Greg KH, Rafael J. Wysocki, Stephen Rothwell, linux-next,
linux-kernel, pm list, Alan Stern, Mauro Carvalho Chehab,
linux-media
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/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-08-20 7:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-19 7:24 linux-next: suspend tree build warnings Stephen Rothwell
2009-08-19 21:38 ` Rafael J. Wysocki
2009-08-19 23:36 ` Greg KH
2009-08-20 0:44 ` Andy Walls
2009-08-20 7:01 ` Patrick Boettcher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox