From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Walls Subject: Re: linux-next: suspend tree build warnings Date: Wed, 19 Aug 2009 20:44:16 -0400 Message-ID: <1250729056.2716.37.camel@morgan.walls.org> References: <20090819172419.2cf53008.sfr@canb.auug.org.au> <200908192338.03910.rjw@sisk.pl> <20090819233601.GA2875@kroah.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20090819233601.GA2875@kroah.com> Sender: linux-media-owner@vger.kernel.org To: Greg KH Cc: "Rafael J. Wysocki" , Stephen Rothwell , linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, pm list , Alan Stern , Mauro Carvalho Chehab , linux-media@vger.kernel.org List-Id: linux-next.vger.kernel.org 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, > >=20 > > Hi, > >=20 > > > Today's linux-next build (x86_64 allmodconfig) produced these war= nings: > > >=20 > > > drivers/media/dvb/frontends/dib7000p.c: In function =E2=80=98dib7= 000p_i2c_enumeration=E2=80=99: > > > drivers/media/dvb/frontends/dib7000p.c:1315: warning: the frame s= ize of 2256 bytes is larger than 2048 bytes > > > drivers/media/dvb/frontends/dib3000mc.c: In function =E2=80=98dib= 3000mc_i2c_enumeration=E2=80=99: > > > drivers/media/dvb/frontends/dib3000mc.c:853: warning: the frame s= ize of 2160 bytes is larger than 2048 bytes > > >=20 > > > Introduced by commit 99307958cc9c1b0b2e0dad4bbefdafaf9ac5a681 ("P= M: > > > Introduce core framework for run-time PM of I/O devices (rev. 17)= "). > >=20 > > Well. > >=20 > > This commit increases the size of struct device quite a bit and bot= h of the > > drivers above create a "state" object on the stack that contains st= ruct device > > among other things. >=20 > Ick. struct device should _never_ be on the stack, why would this co= de > 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. The simplest fix is dynamic allocation of the dummy state object with kmalloc() and then to free it before exiting the function. Regards, Andy > thanks, >=20 > greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-media" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html