From: Simon Schwarz <simonschwarzcor@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH RFC] Add general nand functions
Date: Mon, 26 Sep 2011 10:27:55 +0200 [thread overview]
Message-ID: <4E80378B.206@gmail.com> (raw)
In-Reply-To: <4E7CC073.3070000@freescale.com>
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<kgdb.h>
>>
>> #ifdef CONFIG_CMD_NAND
>> -#include<nand.h> /* cannot even include nand.h if it isnt configured */
>> +#include<nand.h>
>> +#include<nand_interface.h> /* 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
next prev parent reply other threads:[~2011-09-26 8:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-18 23:39 [U-Boot] Please pull u-boot-ti/next s-paulraj at ti.com
2011-09-19 7:15 ` Albert ARIBAUD
2011-09-19 7:47 ` Wolfgang Denk
2011-09-19 12:11 ` Albert ARIBAUD
2011-09-19 14:21 ` Paulraj, Sandeep
2011-09-20 6:47 ` [U-Boot] SMDK6400 regression (was: Please pull u-boot-ti/next) Albert ARIBAUD
2011-09-20 7:38 ` [U-Boot] SMDK6400 regression Simon Schwarz
2011-09-21 9:13 ` Simon Schwarz
2011-09-21 19:35 ` Scott Wood
2011-09-23 16:36 ` [U-Boot] [PATCH RFC] Add general nand functions Simon Schwarz
2011-09-23 16:42 ` Simon Schwarz
2011-09-23 17:22 ` Scott Wood
2011-09-26 8:27 ` Simon Schwarz [this message]
2011-09-27 0:28 ` Scott Wood
2011-09-27 10:09 ` [U-Boot] [PATCH RFC 1/3] nand: Remove static modifier from common functions Simon Schwarz
2011-09-27 10:09 ` [U-Boot] [PATCH RFC 2/3] nand: Add common functions to nand.h Simon Schwarz
2011-09-27 10:09 ` [U-Boot] [PATCH RFC 3/3] Fix regression in SMDK6400 Simon Schwarz
2011-09-27 10:14 ` [U-Boot] [PATCH RFC] Add general nand functions Simon Schwarz
2011-09-27 22:50 ` Scott Wood
2011-09-28 8:48 ` Simon Schwarz
2011-09-20 6:49 ` [U-Boot] Please pull u-boot-ti/next Albert ARIBAUD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E80378B.206@gmail.com \
--to=simonschwarzcor@googlemail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox