]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
arch/powerpc: replace obsolete strict_strto* calls
authorDaniel Walter <dwalter@google.com>
Thu, 26 Jun 2014 00:43:15 +0000 (10:43 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 27 Jun 2014 04:21:47 +0000 (14:21 +1000)
Replace strict_strto calls with more appropriate kstrto calls

Signed-off-by: Daniel Walter <dwalter@google.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/powerpc/kernel/setup_64.c
arch/powerpc/kernel/vio.c
arch/powerpc/platforms/pseries/dlpar.c
arch/powerpc/platforms/pseries/mobility.c

index ee082d771178d463ff259adef107de4845ed84f2..52571663ed663ce9ee5a2779d25f43a0400337ff 100644 (file)
@@ -149,13 +149,13 @@ static void check_smt_enabled(void)
                else if (!strcmp(smt_enabled_cmdline, "off"))
                        smt_enabled_at_boot = 0;
                else {
-                       long smt;
+                       int smt;
                        int rc;
 
-                       rc = strict_strtol(smt_enabled_cmdline, 10, &smt);
+                       rc = kstrtoint(smt_enabled_cmdline, 10, &smt);
                        if (!rc)
                                smt_enabled_at_boot =
-                                       min(threads_per_core, (int)smt);
+                                       min(threads_per_core, smt);
                }
        } else {
                dn = of_find_node_by_path("/options");
index 904c66128faeb7d31a8463532929d187254da7ed..5bfdab9047be2577443a77034e718ae56253546e 100644 (file)
@@ -977,7 +977,7 @@ static ssize_t viodev_cmo_desired_set(struct device *dev,
        size_t new_desired;
        int ret;
 
-       ret = strict_strtoul(buf, 10, &new_desired);
+       ret = kstrtoul(buf, 10, &new_desired);
        if (ret)
                return ret;
 
index 022b38e6a80be83c62900419c027562600b0e02a..abc6892a67be8497bec4359ab13e35e300fd2ed7 100644 (file)
@@ -399,10 +399,10 @@ out:
 static ssize_t dlpar_cpu_probe(const char *buf, size_t count)
 {
        struct device_node *dn, *parent;
-       unsigned long drc_index;
+       u32 drc_index;
        int rc;
 
-       rc = strict_strtoul(buf, 0, &drc_index);
+       rc = kstrtou32(buf, 0, &drc_index);
        if (rc)
                return -EINVAL;
 
index bde7ebad3949c941c31fd7b6df67ba4bb15ee32c..0694ac6b62506629b88151fc509b9878058ea88f 100644 (file)
@@ -319,7 +319,7 @@ static ssize_t migrate_store(struct class *class, struct class_attribute *attr,
        u64 streamid;
        int rc;
 
-       rc = strict_strtoull(buf, 0, &streamid);
+       rc = kstrtou64(buf, 0, &streamid);
        if (rc)
                return rc;