[U-Boot] [PATCH v6 2/4] mtd, nand: move common functions from cmd_nand.c to common place

Scott Wood scottwood at freescale.com
Tue Apr 28 01:49:30 CEST 2015


On Mon, 2015-04-27 at 07:42 +0200, Heiko Schocher wrote:
> move common functions from cmd_nand.c (for calculating offset
> and size from cmdline paramter) to common place, so they could
> used from other commands which use mtd partitions.
> 
> For onenand the arg_off_size() is left in common/cmd_onenand.c.
> It should use now the common arg_off() function, but as I could
> not test onenand I let it there ...
> 
> Signed-off-by: Heiko Schocher <hs at denx.de>
> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki at gmail.com>
> 
> ---
> 
> Changes in v6: None
> Changes in v2:
> - none
> Series-changes: 3
> - add comments from scott wood:
>   - align MTD_DEV_TYPE_NAND correct
>   - remove unnecessary inline
>   - rework "jffs2 header" problem later
> - rebase with d6c1ffc7d23f4fe4ae8c91101861055b8e1501b6
> Series-changes: 4
> - rebased against 385a08a60f042061b004642d6b9bb6cfb794ad5a
> Series-changes: 5
> - add comment from Scott Wood:
>   keep the continuation line aligned with the arguments
> Series-changes: 6
> - add Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki at gmail.com>
> - fix Tom Rinis mail addr
> - add comment from Scott Wood:
>   - fix indentation level
>   - add mtd_ prefix
>   - move str2off and str2long into common place, as they are no
>     mtd specific functions and change return value from int to bool
> 
>  common/cmd_nand.c       | 148 ++++++++++--------------------------------------
>  common/cmd_onenand.c    |  19 ++-----
>  common/cmd_test.c       |  12 +---
>  drivers/mtd/Makefile    |   4 +-
>  drivers/mtd/mtd_uboot.c |  99 ++++++++++++++++++++++++++++++++
>  include/linux/mtd/mtd.h |   5 ++
>  include/vsprintf.h      |   2 +
>  lib/vsprintf.c          |  16 ++++++
>  8 files changed, 164 insertions(+), 141 deletions(-)
>  create mode 100644 drivers/mtd/mtd_uboot.c

Acked-by: Scott Wood <scottwood at freescale.com>

-Scott




More information about the U-Boot mailing list