Patchwork mtd: mtdswap: replace strict_strtoul() with kstrtoul()

login
register
mail settings
Submitter Jingoo Han
Date July 19, 2013, 6:54 a.m.
Message ID <000701ce844c$c63f4820$52bdd860$@samsung.com>
Download mbox | patch
Permalink /patch/260189/
State New
Headers show

Comments

Jingoo Han - July 19, 2013, 6:54 a.m.
The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/mtd/mtdswap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Jingoo Han - Aug. 23, 2013, 12:28 a.m.
On Friday, July 19, 2013 3:54 PM, Jingoo Han wrote:

Hi Brian,

Would you apply this patch to l2-mtd.git?
I hope that it is not late. :)
Thank you.

Best regards,
Jingoo Han

> 
> The usage of strict_strtoul() is not preferred, because
> strict_strtoul() is obsolete. Thus, kstrtoul() should be
> used.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
>  drivers/mtd/mtdswap.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c
> index c92f0f6..8b33b26 100644
> --- a/drivers/mtd/mtdswap.c
> +++ b/drivers/mtd/mtdswap.c
> @@ -1425,7 +1425,7 @@ static void mtdswap_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
>  		return;
> 
>  	while ((this_opt = strsep(&parts, ",")) != NULL) {
> -		if (strict_strtoul(this_opt, 0, &part) < 0)
> +		if (kstrtoul(this_opt, 0, &part) < 0)
>  			return;
> 
>  		if (mtd->index == part)
> --
> 1.7.10.4
Brian Norris - Aug. 24, 2013, 4:54 a.m.
On Fri, Jul 19, 2013 at 03:54:11PM +0900, Jingoo Han wrote:
> The usage of strict_strtoul() is not preferred, because
> strict_strtoul() is obsolete. Thus, kstrtoul() should be
> used.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Applied to l2-mtd.git. Thanks!

Brian

Patch

diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c
index c92f0f6..8b33b26 100644
--- a/drivers/mtd/mtdswap.c
+++ b/drivers/mtd/mtdswap.c
@@ -1425,7 +1425,7 @@  static void mtdswap_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
 		return;
 
 	while ((this_opt = strsep(&parts, ",")) != NULL) {
-		if (strict_strtoul(this_opt, 0, &part) < 0)
+		if (kstrtoul(this_opt, 0, &part) < 0)
 			return;
 
 		if (mtd->index == part)