From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Fri, 30 Jul 2010 08:24:35 +0200 Subject: [U-Boot] [RFC][PATCH 14/19] nand_fsl_nfc: get rid of local var In-Reply-To: <20100729114050.13a62e5e@schlenkerla.am.freescale.net> References: <4C515BAF.90403@denx.de> <20100729114050.13a62e5e@schlenkerla.am.freescale.net> Message-ID: <4C527023.8080807@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Scott, Scott Wood wrote: > On Thu, 29 Jul 2010 12:45:03 +0200 > Heiko Schocher wrote: > >> If we have -fPIC enabled, this var leads in one entry in the >> GOT. The result of this is that the image size is > 0x800. >> >> Signed-off-by: Heiko Schocher > > Acked-by: Scott Wood > >> diff --git a/nand_spl/nand_boot_fsl_nfc.c b/nand_spl/nand_boot_fsl_nfc.c >> index 9720f6a..0543512 100644 >> --- a/nand_spl/nand_boot_fsl_nfc.c >> +++ b/nand_spl/nand_boot_fsl_nfc.c >> @@ -34,10 +34,9 @@ >> #include >> #include >> >> -struct fsl_nfc_regs *nfc; >> - >> static void nfc_wait_ready(void) >> { >> + struct fsl_nfc_regs *nfc = (void *)NFC_BASE_ADDR; > > Alternatively, would this work at file scope? > > static struct fsl_nfc_regs *const nfc = (void *)NFC_BASE_ADDR; Great tip! Thanks, this works also, I fix this in version 2 bye Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany