From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zhong Hongbo Date: Tue, 10 Jul 2012 21:00:54 +0800 Subject: [U-Boot] [PATCH 02/13] S3C64XX: Switch to use readl/writel to operate nand flash In-Reply-To: <4FFC2015.508@gmail.com> References: <1341655032-30201-1-git-send-email-bocui107@gmail.com> <1341655032-30201-3-git-send-email-bocui107@gmail.com> <4FFB5902.3040305@freescale.com> <4FFC2015.508@gmail.com> Message-ID: <4FFC2786.7000204@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 07/10/2012 08:29 PM, Zhong Hongbo wrote: > On 07/10/2012 06:19 AM, Scott Wood wrote: >> On 07/07/2012 04:57 AM, Zhong Hongbo wrote: >>> +static inline unsigned int s3c64xx_get_base_nand(void) >>> +{ >>> + return ELFIN_NAND_BASE; >>> +} >> >> unsigned long or uintptr_t would be more appropriate, even if U-Boot is >> unlikely to be 64-bit any time soon. > > Ok, I will fix it in V2. > > Thanks, > hongbo >> >> Or better, "struct s3c64xx_nand *". >> >>> @@ -89,15 +96,16 @@ static void s3c_nand_select_chip(struct mtd_info *mtd, int chip) >>> */ >>> static void s3c_nand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl) >>> { >>> + struct s3c64xx_nand *const nand = s3c_get_base_nand(); >> >> Is there any benefit to declaring local variables const like this? > > I reference the nand driver of S5PXX CPU. So ... Sorry, I make a mistake, The S5PXX have not nand flash support. When i do the patch, I use the format as following? struct s3c64xx_nand *nand = s3c_get_base_nand(); But when I use checkpatch.pl script to check the patch. more and more waring about the line, it said that you should add 'const' before nand variable. Thanks, hongbo > > Why >> this one and not all the others that never get altered? > > Ok, I will change it. And i just found the S3c64XX is orphaned board. > So Thanks you for the foucus it! > > Thanks, > hongbo >> >> -Scott >> >> > > > >