EDAC: Replace strict_strtoul() with kstrtoul()
authorJingoo Han <jg1.han@samsung.com>
Sat, 1 Jun 2013 07:08:22 +0000 (16:08 +0900)
committerBorislav Petkov <bp@suse.de>
Sat, 8 Jun 2013 08:16:33 +0000 (10:16 +0200)
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>
Signed-off-by: Borislav Petkov <bp@suse.de>
drivers/edac/amd64_edac_inj.c
drivers/edac/edac_mc_sysfs.c
drivers/edac/i7core_edac.c
drivers/edac/mce_amd_inj.c

index 845f04786c2de4baedf0952d2ec2b5a830e62602..0d66ae68d4681a9bb1ceedfca97fcafbde144d2c 100644 (file)
@@ -24,7 +24,7 @@ static ssize_t amd64_inject_section_store(struct device *dev,
        unsigned long value;
        int ret;
 
-       ret = strict_strtoul(data, 10, &value);
+       ret = kstrtoul(data, 10, &value);
        if (ret < 0)
                return ret;
 
@@ -61,7 +61,7 @@ static ssize_t amd64_inject_word_store(struct device *dev,
        unsigned long value;
        int ret;
 
-       ret = strict_strtoul(data, 10, &value);
+       ret = kstrtoul(data, 10, &value);
        if (ret < 0)
                return ret;
 
@@ -97,7 +97,7 @@ static ssize_t amd64_inject_ecc_vector_store(struct device *dev,
        unsigned long value;
        int ret;
 
-       ret = strict_strtoul(data, 16, &value);
+       ret = kstrtoul(data, 16, &value);
        if (ret < 0)
                return ret;
 
@@ -124,7 +124,7 @@ static ssize_t amd64_inject_read_store(struct device *dev,
        u32 section, word_bits;
        int ret;
 
-       ret = strict_strtoul(data, 10, &value);
+       ret = kstrtoul(data, 10, &value);
        if (ret < 0)
                return ret;
 
@@ -157,7 +157,7 @@ static ssize_t amd64_inject_write_store(struct device *dev,
        unsigned long value;
        int ret;
 
-       ret = strict_strtoul(data, 10, &value);
+       ret = kstrtoul(data, 10, &value);
        if (ret < 0)
                return ret;
 
index 67610a6ebf875765682cb50bec4226b42f956fc3..ef15a7e613bc6b1d1feec75733a86e20cb23efa7 100644 (file)
@@ -678,7 +678,7 @@ static ssize_t mci_sdram_scrub_rate_store(struct device *dev,
        unsigned long bandwidth = 0;
        int new_bw = 0;
 
-       if (strict_strtoul(data, 10, &bandwidth) < 0)
+       if (kstrtoul(data, 10, &bandwidth) < 0)
                return -EINVAL;
 
        new_bw = mci->set_sdram_scrub_rate(mci, bandwidth);
index 0ec3e95a12cd48c37fa100542e2bbe010cb4afad..80a963d64e58c143db789743d664e998c9e1ee66 100644 (file)
@@ -704,7 +704,7 @@ static ssize_t i7core_inject_section_store(struct device *dev,
        if (pvt->inject.enable)
                disable_inject(mci);
 
-       rc = strict_strtoul(data, 10, &value);
+       rc = kstrtoul(data, 10, &value);
        if ((rc < 0) || (value > 3))
                return -EIO;
 
@@ -741,7 +741,7 @@ struct i7core_pvt *pvt = mci->pvt_info;
        if (pvt->inject.enable)
                disable_inject(mci);
 
-       rc = strict_strtoul(data, 10, &value);
+       rc = kstrtoul(data, 10, &value);
        if ((rc < 0) || (value > 7))
                return -EIO;
 
@@ -781,7 +781,7 @@ static ssize_t i7core_inject_eccmask_store(struct device *dev,
        if (pvt->inject.enable)
                disable_inject(mci);
 
-       rc = strict_strtoul(data, 10, &value);
+       rc = kstrtoul(data, 10, &value);
        if (rc < 0)
                return -EIO;
 
@@ -830,7 +830,7 @@ static ssize_t i7core_inject_store_##param(                 \
        if (!strcasecmp(data, "any") || !strcasecmp(data, "any\n"))\
                value = -1;                                     \
        else {                                                  \
-               rc = strict_strtoul(data, 10, &value);          \
+               rc = kstrtoul(data, 10, &value);                \
                if ((rc < 0) || (value >= limit))               \
                        return -EIO;                            \
        }                                                       \
@@ -934,7 +934,7 @@ static ssize_t i7core_inject_enable_store(struct device *dev,
        if (!pvt->pci_ch[pvt->inject.channel][0])
                return 0;
 
-       rc = strict_strtoul(data, 10, &enable);
+       rc = kstrtoul(data, 10, &enable);
        if ((rc < 0))
                return 0;
 
index 2ae78f20cc28f3850cc26a9156927c7b4e8b085e..5e46a9fea31bef134bb9f1d4685bec3c2f108250 100644 (file)
@@ -43,7 +43,7 @@ static ssize_t edac_inject_##reg##_store(struct kobject *kobj,                \
        int ret = 0;                                                    \
        unsigned long value;                                            \
                                                                        \
-       ret = strict_strtoul(data, 16, &value);                         \
+       ret = kstrtoul(data, 16, &value);                               \
        if (ret < 0)                                                    \
                printk(KERN_ERR "Error writing MCE " #reg " field.\n"); \
                                                                        \
@@ -83,7 +83,7 @@ static ssize_t edac_inject_bank_store(struct kobject *kobj,
        int ret = 0;
        unsigned long value;
 
-       ret = strict_strtoul(data, 10, &value);
+       ret = kstrtoul(data, 10, &value);
        if (ret < 0) {
                printk(KERN_ERR "Invalid bank value!\n");
                return -EINVAL;
This page took 0.030713 seconds and 5 git commands to generate.