From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v5 2/3] mtd, nand: move common functions from cmd_nand.c to common place
Date: Wed, 22 Apr 2015 17:47:54 -0500 [thread overview]
Message-ID: <1429742874.4352.138.camel@freescale.com> (raw)
In-Reply-To: <1429508853-10139-3-git-send-email-hs@denx.de>
On Mon, 2015-04-20 at 07:47 +0200, Heiko Schocher wrote:
> @@ -322,7 +213,12 @@ int do_nand_env_oob(cmd_tbl_t *cmdtp, int argc, char *const argv[])
> goto usage;
>
> /* We don't care about size, or maxsize. */
> - if (arg_off(argv[2], &idx, &addr, &maxsize, &maxsize)) {
> + if (arg_off(argv[2], &idx, &addr, &maxsize, &maxsize,
> + MTD_DEV_TYPE_NAND, nand_info[idx].size)) {
> + puts("Offset or partition name expected\n");
> + return 1;
> + }
Use only one tab per indentation level.
> diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
> index 8666413..2861af5 100644
> --- a/include/linux/mtd/mtd.h
> +++ b/include/linux/mtd/mtd.h
> @@ -482,5 +482,12 @@ int add_mtd_device(struct mtd_info *mtd);
> int del_mtd_device(struct mtd_info *mtd);
> int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int);
> int del_mtd_partitions(struct mtd_info *);
> +
> +int str2off(const char *p, loff_t *num);
> +int str2long(const char *p, ulong *num);
These should be moved somewhere more generic, especially if they're no
longer file-local.
> +int arg_off(const char *arg, int *idx, loff_t *off, loff_t *size,
> + loff_t *maxsize, int devtype, int chipsize);
> +int arg_off_size(int argc, char *const argv[], int *idx, loff_t *off,
> + loff_t *size, loff_t *maxsize, int devtype, int chipsize);
Add an mtd prefix.
-Scott
next prev parent reply other threads:[~2015-04-22 22:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-20 5:47 [U-Boot] [PATCH v5 0/3] spi, sf: add mtdparts feature to spi and sf commands Heiko Schocher
2015-04-20 5:47 ` [U-Boot] [PATCH v5 1/3] mtd, spi: add MTD layer driver Heiko Schocher
2015-04-22 10:52 ` Jagan Teki
2015-04-23 5:27 ` Heiko Schocher
2015-04-20 5:47 ` [U-Boot] [PATCH v5 2/3] mtd, nand: move common functions from cmd_nand.c to common place Heiko Schocher
2015-04-22 10:53 ` Jagan Teki
2015-04-22 22:47 ` Scott Wood [this message]
2015-04-23 5:57 ` Heiko Schocher
2015-04-23 6:55 ` Scott Wood
2015-04-23 11:12 ` Heiko Schocher
2015-04-23 17:48 ` Scott Wood
2015-04-24 4:59 ` Heiko Schocher
2015-04-24 5:25 ` Scott Wood
2015-04-20 5:47 ` [U-Boot] [PATCH v5 3/3] spi, sf: use offset and size in sf cmd from mtdpartition Heiko Schocher
2015-04-22 10:58 ` Jagan Teki
2015-04-23 5:38 ` Heiko Schocher
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=1429742874.4352.138.camel@freescale.com \
--to=scottwood@freescale.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