Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[PATCH 3/8] UBI: introduce MTD_PARAM_MAX_COUNT

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


richard.genoud at gmail

Aug 17, 2012, 7:35 AM

Post #1 of 3 (43 views)
Permalink
[PATCH 3/8] UBI: introduce MTD_PARAM_MAX_COUNT

Signed-off-by: Richard Genoud <richard.genoud [at] gmail>
---
drivers/mtd/ubi/build.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 82d11e1..1f45f51 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -46,6 +46,9 @@
/* Maximum length of the 'mtd=' parameter */
#define MTD_PARAM_LEN_MAX 64

+/* Maximum number of comma-separated items in ht 'mtd=' parameter */
+#define MTD_PARAM_MAX_COUNT 2
+
#ifdef CONFIG_MTD_UBI_MODULE
#define ubi_is_module() 1
#else
@@ -1327,7 +1330,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
struct mtd_dev_param *p;
char buf[MTD_PARAM_LEN_MAX];
char *pbuf = &buf[0];
- char *tokens[2] = {NULL, NULL};
+ char *tokens[MTD_PARAM_MAX_COUNT];

if (!val)
return -EINVAL;
@@ -1357,7 +1360,7 @@ static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp)
if (buf[len - 1] == '\n')
buf[len - 1] = '\0';

- for (i = 0; i < 2; i++)
+ for (i = 0; i < MTD_PARAM_MAX_COUNT; i++)
tokens[i] = strsep(&pbuf, ",");

if (pbuf) {
--
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


dedekind1 at gmail

Aug 19, 2012, 12:32 PM

Post #2 of 3 (40 views)
Permalink
Re: [PATCH 3/8] UBI: introduce MTD_PARAM_MAX_COUNT [In reply to]

On Fri, 2012-08-17 at 16:35 +0200, Richard Genoud wrote:
> Signed-off-by: Richard Genoud <richard.genoud [at] gmail>
> ---
> drivers/mtd/ubi/build.c | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
> index 82d11e1..1f45f51 100644
> --- a/drivers/mtd/ubi/build.c
> +++ b/drivers/mtd/ubi/build.c
> @@ -46,6 +46,9 @@
> /* Maximum length of the 'mtd=' parameter */
> #define MTD_PARAM_LEN_MAX 64
>
> +/* Maximum number of comma-separated items in ht 'mtd=' parameter */
> +#define MTD_PARAM_MAX_COUNT 2

Fixed the spelling of "the" and pushed to l2-mtd.git, thanks!

--
Best Regards,
Artem Bityutskiy
Attachments: signature.asc (0.82 KB)


dedekind1 at gmail

Aug 19, 2012, 12:32 PM

Post #3 of 3 (39 views)
Permalink
Re: [PATCH 3/8] UBI: introduce MTD_PARAM_MAX_COUNT [In reply to]

On Fri, 2012-08-17 at 16:35 +0200, Richard Genoud wrote:
> Signed-off-by: Richard Genoud <richard.genoud [at] gmail>
> ---
> drivers/mtd/ubi/build.c | 7 +++++--
> 1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
> index 82d11e1..1f45f51 100644
> --- a/drivers/mtd/ubi/build.c
> +++ b/drivers/mtd/ubi/build.c
> @@ -46,6 +46,9 @@
> /* Maximum length of the 'mtd=' parameter */
> #define MTD_PARAM_LEN_MAX 64
>
> +/* Maximum number of comma-separated items in ht 'mtd=' parameter */
> +#define MTD_PARAM_MAX_COUNT 2

Fixed the spelling of "the" and pushed to linux-ubi.git, thanks!

--
Best Regards,
Artem Bityutskiy
Attachments: signature.asc (0.82 KB)

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.