Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

EDAC: Replace strict_strtoul() with kstrtoul()

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>

authored by

Jingoo Han and committed by
Borislav Petkov
c7f62fc8 d683b96b

+13 -13
+5 -5
drivers/edac/amd64_edac_inj.c
··· 24 24 unsigned long value; 25 25 int ret; 26 26 27 - ret = strict_strtoul(data, 10, &value); 27 + ret = kstrtoul(data, 10, &value); 28 28 if (ret < 0) 29 29 return ret; 30 30 ··· 61 61 unsigned long value; 62 62 int ret; 63 63 64 - ret = strict_strtoul(data, 10, &value); 64 + ret = kstrtoul(data, 10, &value); 65 65 if (ret < 0) 66 66 return ret; 67 67 ··· 97 97 unsigned long value; 98 98 int ret; 99 99 100 - ret = strict_strtoul(data, 16, &value); 100 + ret = kstrtoul(data, 16, &value); 101 101 if (ret < 0) 102 102 return ret; 103 103 ··· 124 124 u32 section, word_bits; 125 125 int ret; 126 126 127 - ret = strict_strtoul(data, 10, &value); 127 + ret = kstrtoul(data, 10, &value); 128 128 if (ret < 0) 129 129 return ret; 130 130 ··· 157 157 unsigned long value; 158 158 int ret; 159 159 160 - ret = strict_strtoul(data, 10, &value); 160 + ret = kstrtoul(data, 10, &value); 161 161 if (ret < 0) 162 162 return ret; 163 163
+1 -1
drivers/edac/edac_mc_sysfs.c
··· 678 678 unsigned long bandwidth = 0; 679 679 int new_bw = 0; 680 680 681 - if (strict_strtoul(data, 10, &bandwidth) < 0) 681 + if (kstrtoul(data, 10, &bandwidth) < 0) 682 682 return -EINVAL; 683 683 684 684 new_bw = mci->set_sdram_scrub_rate(mci, bandwidth);
+5 -5
drivers/edac/i7core_edac.c
··· 704 704 if (pvt->inject.enable) 705 705 disable_inject(mci); 706 706 707 - rc = strict_strtoul(data, 10, &value); 707 + rc = kstrtoul(data, 10, &value); 708 708 if ((rc < 0) || (value > 3)) 709 709 return -EIO; 710 710 ··· 741 741 if (pvt->inject.enable) 742 742 disable_inject(mci); 743 743 744 - rc = strict_strtoul(data, 10, &value); 744 + rc = kstrtoul(data, 10, &value); 745 745 if ((rc < 0) || (value > 7)) 746 746 return -EIO; 747 747 ··· 781 781 if (pvt->inject.enable) 782 782 disable_inject(mci); 783 783 784 - rc = strict_strtoul(data, 10, &value); 784 + rc = kstrtoul(data, 10, &value); 785 785 if (rc < 0) 786 786 return -EIO; 787 787 ··· 830 830 if (!strcasecmp(data, "any") || !strcasecmp(data, "any\n"))\ 831 831 value = -1; \ 832 832 else { \ 833 - rc = strict_strtoul(data, 10, &value); \ 833 + rc = kstrtoul(data, 10, &value); \ 834 834 if ((rc < 0) || (value >= limit)) \ 835 835 return -EIO; \ 836 836 } \ ··· 934 934 if (!pvt->pci_ch[pvt->inject.channel][0]) 935 935 return 0; 936 936 937 - rc = strict_strtoul(data, 10, &enable); 937 + rc = kstrtoul(data, 10, &enable); 938 938 if ((rc < 0)) 939 939 return 0; 940 940
+2 -2
drivers/edac/mce_amd_inj.c
··· 43 43 int ret = 0; \ 44 44 unsigned long value; \ 45 45 \ 46 - ret = strict_strtoul(data, 16, &value); \ 46 + ret = kstrtoul(data, 16, &value); \ 47 47 if (ret < 0) \ 48 48 printk(KERN_ERR "Error writing MCE " #reg " field.\n"); \ 49 49 \ ··· 83 83 int ret = 0; 84 84 unsigned long value; 85 85 86 - ret = strict_strtoul(data, 10, &value); 86 + ret = kstrtoul(data, 10, &value); 87 87 if (ret < 0) { 88 88 printk(KERN_ERR "Invalid bank value!\n"); 89 89 return -EINVAL;