Skip to contentSkip to conversation

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

PATCH Applied Jingoo Han 2 participants 3 messages Jul 19, 2013 – Aug 24, 2013 Memory technology devices (MTD)

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 mtd: mtdswap: replace strict_strtoul() with kstrtoul()

The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used.

---
 drivers/mtd/mtdswap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/mtdswap.c +1 -1
index c92f0f6..8b33b26 100644
@@ -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)
Signature · 1 line
1.7.10.4
author
#1 lore raw

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

Quoted 25 lines

The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used.

---
 drivers/mtd/mtdswap.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/mtdswap.c +1 -2
index c92f0f6..8b33b26 100644
@@ -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