[U-Boot] [PATCH 2/4] [v3] nand_util: convert nand_write_skip_bad() to flags
Scott Wood
scottwood at freescale.com
Mon Jun 6 23:32:50 CEST 2011
On Tue, May 24, 2011 at 10:18:35AM -0400, Ben Gardiner wrote:
> In a future commit the behaviour of nand_write_skip_bad()
> will be further extended.
>
> Convert the only flag currently passed to the nand_write_
> skip_bad() function to a bitfield of only one allocated
> member. This should avoid an explosion of int's at the
> end of the parameter list or the ambiguous calls like
>
> nand_write_skip_bad(info, offset, len, buf, 0, 1, 1);
> nand_write_skip_bad(info, offset, len, buf, 0, 1, 0);
>
> Instead there will be:
>
> nand_write_skip_bad(info, offset, len, buf, WITH_YAFFS_OOB |
> WITH_OTHER);
>
> Signed-off-by: Ben Gardiner <bengardiner at nanometrics.ca>
> Acked-by: Detlev Zundel <dzu at denx.de>
>
> ---
> Changes since v2:
> * Added Detlev's Acked-by
> * removed the WITH_DEFAULTS flag -- zero is fine (Detlev Zundel)
> * fixed typo 'mmofying' to 'modifying' in comment
> Changes since v1:
> * rebased to HEAD of git://git.denx.de/u-boot-nand-flash.git : ff7b4a0
> ("env_nand: zero-initialize variable nand_erase_options")
> * renamed the flag from WITH_OOB to WITH_YAFFS_OOB (Detlev Zundel)
> * introduce 'WITH_DEFAULTS' flag defined as 0 so as to convert also
> the remaining nand_write_skip_bad() call (Detlev Zundel)
> ---
> common/cmd_nand.c | 3 ++-
> drivers/mtd/nand/nand_util.c | 8 ++++----
> include/nand.h | 5 ++++-
> 3 files changed, 10 insertions(+), 6 deletions(-)
Applied to u-boot-nand-flash next
-Scott
More information about the U-Boot
mailing list