All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][linux-2.6] Fix gcc 4.4 warning in lba_pci.c
@ 2009-06-20 22:46 Grant Grundler
  2009-06-20 23:11 ` Grant Grundler
  2009-06-20 23:55 ` [PATCH][linux-2.6] v4 : " Grant Grundler
  0 siblings, 2 replies; 13+ messages in thread
From: Grant Grundler @ 2009-06-20 22:46 UTC (permalink / raw)
  To: Kyle McMartin, Helge Deller; +Cc: linux-parisc

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".

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
---

diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c
index 59fbbf1..7535cb3 100644
--- a/drivers/parisc/lba_pci.c
+++ b/drivers/parisc/lba_pci.c
@@ -980,13 +980,17 @@ static void
 lba_pat_resources(struct parisc_device *pa_dev, struct lba_device *lba_dev)
 {
 	unsigned long bytecnt;
-	pdc_pat_cell_mod_maddr_block_t pa_pdc_cell;	/* PA_VIEW */
-	pdc_pat_cell_mod_maddr_block_t io_pdc_cell;	/* IO_VIEW */
 	long io_count;
 	long status;	/* PDC return status */
 	long pa_count;
 	int i;
 
+	/* We don't need additional locking around the use of pdc_pat_cell
+	**  since init time PDC device discovery is already serialized.
+	*/
+	static pdc_pat_cell_mod_maddr_block_t pa_pdc_cell;	/* PA_VIEW */
+	static pdc_pat_cell_mod_maddr_block_t io_pdc_cell;	/* IO_VIEW */
+
 	/* return cell module (IO view) */
 	status = pdc_pat_cell_module(&bytecnt, pa_dev->pcell_loc, pa_dev->mod_index,
 				PA_VIEW, & pa_pdc_cell);

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-06-24 13:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-20 22:46 [PATCH][linux-2.6] Fix gcc 4.4 warning in lba_pci.c Grant Grundler
2009-06-20 23:11 ` Grant Grundler
2009-06-20 23:26   ` James Bottomley
2009-06-20 23:29     ` Grant Grundler
2009-06-21  0:06       ` John David Anglin
2009-06-23  6:31         ` Grant Grundler
2009-06-23 11:39           ` Carlos O'Donell
2009-06-24  5:31             ` Grant Grundler
2009-06-24 13:47               ` John David Anglin
2009-06-20 23:34     ` Grant Grundler
2009-06-20 23:39       ` John David Anglin
2009-06-20 23:51         ` Grant Grundler
2009-06-20 23:55 ` [PATCH][linux-2.6] v4 : " Grant Grundler

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.