UBI: introduce MTD_PARAM_MAX_COUNT
Subsystems (2)
PATCH RESEND 1/1 UBI: introduce MTD_PARAM_MAX_COUNT
Here is the patch accidentally dropped.
I rebased it on linux-ubi/master (9baf0a2) and made sure the other ones:
* UBI: replace MTD_UBI_BEB_LIMIT with module parameter
* UBI: add ioctl for max_beb_per1024
* UBI: drop CONFIG_MTD_UBI_BEB_LIMIT
still apply correctly (and they still do, so I don't resend them).
Best regards,
Richard.
--- drivers/mtd/ubi/build.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
drivers/mtd/ubi/build.c +5 -2
@@ -46,6 +46,9 @@/* Maximum length of the 'mtd=' parameter */ #define MTD_PARAM_LEN_MAX 64 +/* Maximum number of comma-separated items in the 'mtd=' parameter */ +#define MTD_PARAM_MAX_COUNT 2 +/* Maximum value for the number of bad PEBs per 1024 PEBs */ #define MAX_MTD_UBI_BEB_LIMIT 768
@@ -1338,7 +1341,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 ;
@@ -1368,7 +1371,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) {
Signature · 1 line
1.7.2.5
Quoted 7 lines · Richard Genoud
Here is the patch accidentally dropped.
I rebased it on linux-ubi/master (9baf0a2) and made sure the other ones:
* UBI: replaceMTD_UBI_BEB_LIMITwith module parameter
* UBI: add ioctl formax_beb_per1024
* UBI: dropCONFIG_MTD_UBI_BEB_LIMITstill apply correctly (and they still do, so I don't resend them).
Thanks Richard, I said that I returned it, but I forgot to push. Now I actually pushed the changes out.
Signature · 2 lines
Best Regards, Artem Bityutskiy