On Tue, 5 Aug 2008, Scott Wood wrote:

> Also, remove the ctrl variable in favor of passing the constants
> directly, and remove redundant (u8) casts.
> 
> Signed-off-by: Scott Wood <[EMAIL PROTECTED]>
> ---
> This patch is untested, as I don't have the hardware.
> Applied to u-boot-nand-flash/testing.
> 
>  nand_spl/nand_boot.c |   50 
> ++++++++++++++++++++------------------------------
>  1 files changed, 20 insertions(+), 30 deletions(-)
> 
> diff --git a/nand_spl/nand_boot.c b/nand_spl/nand_boot.c
> index 0f56ba5..81b4dfc 100644
> --- a/nand_spl/nand_boot.c
> +++ b/nand_spl/nand_boot.c
> @@ -37,7 +37,6 @@ static int nand_command(struct mtd_info *mtd, int block, 
> int page, int offs, u8
>  {
>       struct nand_chip *this = mtd->priv;
>       int page_addr = page + block * CFG_NAND_PAGE_COUNT;
> -     int ctrl = NAND_CTRL_CLE | NAND_CTRL_CHANGE;
>  
>       if (this->dev_ready)
>               while (!this->dev_ready(mtd))
> @@ -46,18 +45,15 @@ static int nand_command(struct mtd_info *mtd, int block, 
> int page, int offs, u8
>               CFG_NAND_READ_DELAY;
>  
>       /* Begin command latch cycle */
> -     this->cmd_ctrl(mtd, cmd, ctrl);
> +     this->cmd_ctrl(mtd, cmd, NAND_CTRL_CLE | NAND_CTRL_CHANGE);

[snip]

See? you do the same! You replace short lowercase variable with long 
uppercase macros:-) But I like this change, as well as mine - it makes it 
easier to follow the sources. I'll test your patch later - as soon as I 
get access to the hardware... Probably, tomorrow.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.

DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: [EMAIL PROTECTED]

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to