Re: [PATCH][linux-2.6] Fix gcc 4.4 warning in lba_pci.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 20, 2009 at 06:26:15PM -0500, James Bottomley wrote:
> On Sat, 2009-06-20 at 17:11 -0600, Grant Grundler wrote:
> > On Sat, Jun 20, 2009 at 04:46:13PM -0600, Grant Grundler wrote:
> > > gcc 4.4 warns about:
> > > drivers/parisc/lba_pci.c: In function 'lba_pat_resources':
> > > drivers/parisc/lba_pci.c:1099: warning: the frame size of 8280 bytes is larger than 4096 bytes
> > > 
> > > The problem is we declare two large structures on the stack. They don't need
> > > to be on the stack since they are only used during LBA initialization (which
> > > is serialized). Moving to be "static".
> > 
> > Take 2. Per Kyle's request (offlist), use kzalloc instead since it's not
> > ever used again after boot.
> 
> Um, wouldn't one of the points of using kzalloc over a static allocation
> be to free the memory again after we've finished using it?  Otherwise we
> leek a page for every lba.

Doh...of course!
I was too worried about the error case to think about the regular release.
I'll repost a clean version.

In the meantime...if someone can explain this error I could build and test:
fs/nfs/nfsroot.c:400: error: __setup_str_nfs_root_setup causes a section type conflict

something to do with __setup(nfs_root_setup) but it's not obvious to me what.


thanks,
grant
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux