From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Schwarz Date: Mon, 26 Sep 2011 10:27:55 +0200 Subject: [U-Boot] [PATCH RFC] Add general nand functions In-Reply-To: <4E7CC073.3070000@freescale.com> References: <4E7A3C98.8050407@freescale.com> <1316795819-3163-1-git-send-email-simonschwarzcor@gmail.com> <4E7CC073.3070000@freescale.com> Message-ID: <4E80378B.206@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 09/23/2011 07:22 PM, Scott Wood wrote: > On 09/23/2011 11:36 AM, Simon Schwarz wrote: >> Added a nand_base.h header that defines all prototypes of nand_base.c >> functions. > > Just add the new prototypes to include/linux/mtd/nand.h (which gets > included by nand.h), that's the header that goes with > drivers/mtd/nand/nand_base.c. > That was my first intention. I changed my mind because of the name collisions. >> This is necessary because these functions were often copied >> in SPLs. > > You'd rather add new #includes to dozens of files, and keep duplicated > code around, than fix a few SPLs? NACK. > Where do you see duplicated code? The additional include? >> It was necessary to also add nand_interface.c. > > You maen nand_interface.h? > Yes sorry. >> This now defines static >> inline functions former defined in nand.h - theses functions had name >> conflicts with these in nand_base.c/h. > > If we have two functions with the same name that do different things, > change the name of the one in nand.h. > >> diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c >> index bfdb586..4568820 100644 >> --- a/arch/blackfin/lib/board.c >> +++ b/arch/blackfin/lib/board.c >> @@ -25,7 +25,8 @@ >> #include >> >> #ifdef CONFIG_CMD_NAND >> -#include /* cannot even include nand.h if it isnt configured */ >> +#include >> +#include /* cannot even include nand.h if it isnt configured */ > > > I don't think it's still true that you can't include nand.h if it isn't > configured, BTW. > Auto search and replace. [SNIP] so in essence I will: - rename the inline functions - just add the functions used in SPL now - make better patch-splitting objections? Regards Simon