From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Mon, 27 Apr 2015 18:49:30 -0500 Subject: [U-Boot] [PATCH v6 2/4] mtd, nand: move common functions from cmd_nand.c to common place In-Reply-To: <1430113328-29184-3-git-send-email-hs@denx.de> References: <1430113328-29184-1-git-send-email-hs@denx.de> <1430113328-29184-3-git-send-email-hs@denx.de> Message-ID: <1430178570.16357.54.camel@freescale.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 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 > Reviewed-by: Jagannadha Sutradharudu Teki > > --- > > 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 > - 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 -Scott