Skip to contentSkip to conversation

replace obsolete strict_strto calls

PATCH Superseded Daniel Walter 1 participant 1 message Jun 3, 2014 MIPS

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 6/11 replace obsolete strict_strto calls

From: Daniel Walter <[email protected]>
Subject: [PATCH v2 06/11] [arch/mips] replace obsolete strict_strto calls

Replace obsolete strict_strto call with more appropriate calls to kstrto*

---
 arch/mips/pci/ops-tx4927.c     | 9 ++++++---
 arch/mips/txx9/generic/setup.c | 4 ++--
 2 files changed, 8 insertions(+), 5 deletions(-)
arch/mips/pci/ops-tx4927.c +6 -3
index 3d5df51..0e046d8 100644
@@ -202,17 +202,20 @@ char *tx4927_pcibios_setup(char *str)
 	unsigned long val;
 
 	if (!strncmp(str, "trdyto=", 7)) {
-		if (strict_strtoul(str + 7, 0, &val) == 0)
+		u8 val = 0;
+		if (kstrtou8(str + 7, 0, &val) == 0)
 			tx4927_pci_opts.trdyto = val;
 		return NULL;
 	}
 	if (!strncmp(str, "retryto=", 8)) {
-		if (strict_strtoul(str + 8, 0, &val) == 0)
+		u8 val = 0;
+		if (kstrtou8(str + 8, 0, &val) == 0)
 			tx4927_pci_opts.retryto = val;
 		return NULL;
 	}
 	if (!strncmp(str, "gbwc=", 5)) {
-		if (strict_strtoul(str + 5, 0, &val) == 0)
+		u16 val;
+		if (kstrtou16(str + 5, 0, &val) == 0)
 			tx4927_pci_opts.gbwc = val;
 		return NULL;
 	}
arch/mips/txx9/generic/setup.c +2 -2
index 2b0b83c..dd2cf25 100644
@@ -309,8 +309,8 @@ static void __init preprocess_cmdline(void)
 			txx9_board_vec = find_board_byname(str + 6);
 			continue;
 		} else if (strncmp(str, "masterclk=", 10) == 0) {
-			unsigned long val;
-			if (strict_strtoul(str + 10, 10, &val) == 0)
+			unsigned int val;
+			if (kstrtouint(str + 10, 10, &val) == 0)
 				txx9_master_clock = val;
 			continue;
 		} else if (strcmp(str, "icdisable") == 0) {
Signature · 1 line
1.9.3