From 4176b6fdd30011a1b86fd14a2211b6e8a15d6140 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 27 Jul 2013 09:23:18 +0000 Subject: [PATCH] strict_strtoul is obsolete, use kstrtoul instead based on http://patchwork.openwrt.org/patch/3827/ Signed-off-by: John Crispin SVN-Revision: 37562 --- .../patches/512-ath9k_channelbw_debugfs.patch | 2 +- .../patches/553-ath9k_debugfs_diag.patch | 2 +- .../files/drivers/net/phy/rtl8366_smi.c | 2 +- .../generic/patches-3.10/863-gpiommc.patch | 18 +++++++++--------- .../864-gpiommc_configfs_locking.patch | 2 +- .../generic/patches-3.3/863-gpiommc.patch | 18 +++++++++--------- .../864-gpiommc_configfs_locking.patch | 2 +- .../generic/patches-3.6/863-gpiommc.patch | 18 +++++++++--------- .../864-gpiommc_configfs_locking.patch | 2 +- .../generic/patches-3.8/863-gpiommc.patch | 18 +++++++++--------- .../864-gpiommc_configfs_locking.patch | 2 +- .../generic/patches-3.9/863-gpiommc.patch | 18 +++++++++--------- .../864-gpiommc_configfs_locking.patch | 2 +- 13 files changed, 53 insertions(+), 53 deletions(-) diff --git a/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch b/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch index 681291dc55..d6d1ae2e63 100644 --- a/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch +++ b/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch @@ -47,7 +47,7 @@ + return -EFAULT; + + buf[len] = '\0'; -+ if (strict_strtoul(buf, 0, &chan_bw)) ++ if (kstrtoul(buf, 0, &chan_bw)) + return -EINVAL; + + sc->chan_bw = chan_bw; diff --git a/package/kernel/mac80211/patches/553-ath9k_debugfs_diag.patch b/package/kernel/mac80211/patches/553-ath9k_debugfs_diag.patch index db380b0814..7cf1c2a3fd 100644 --- a/package/kernel/mac80211/patches/553-ath9k_debugfs_diag.patch +++ b/package/kernel/mac80211/patches/553-ath9k_debugfs_diag.patch @@ -30,7 +30,7 @@ + return -EFAULT; + + buf[len] = '\0'; -+ if (strict_strtoul(buf, 0, &diag)) ++ if (kstrtoul(buf, 0, &diag)) + return -EINVAL; + + ah->diag = diag; diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c index e2b4f02efa..699234d22d 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8366_smi.c @@ -743,7 +743,7 @@ static ssize_t rtl8366_write_debugfs_reg(struct file *file, buf[len - 1] = '\0'; - if (strict_strtoul(buf, 16, &data)) { + if (kstrtoul(buf, 16, &data)) { dev_err(smi->parent, "Invalid reg value %s\n", buf); } else { err = rtl8366_smi_write_reg(smi, reg, data); diff --git a/target/linux/generic/patches-3.10/863-gpiommc.patch b/target/linux/generic/patches-3.10/863-gpiommc.patch index a9101f473b..00f7c8d2ec 100644 --- a/target/linux/generic/patches-3.10/863-gpiommc.patch +++ b/target/linux/generic/patches-3.10/863-gpiommc.patch @@ -357,7 +357,7 @@ + unsigned long data; + + if (attr == &gpiommc_attr_register) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -378,7 +378,7 @@ + } + + if (attr == &gpiommc_attr_DI) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -389,7 +389,7 @@ + goto out; + } + if (attr == &gpiommc_attr_DO) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -400,7 +400,7 @@ + goto out; + } + if (attr == &gpiommc_attr_CLK) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -411,7 +411,7 @@ + goto out; + } + if (attr == &gpiommc_attr_CS) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -422,7 +422,7 @@ + goto out; + } + if (attr == &gpiommc_attr_CS_activelow) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -433,7 +433,7 @@ + goto out; + } + if (attr == &gpiommc_attr_spimode) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -457,7 +457,7 @@ + goto out; + } + if (attr == &gpiommc_attr_spidelay) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -468,7 +468,7 @@ + goto out; + } + if (attr == &gpiommc_attr_max_bus_speed) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; diff --git a/target/linux/generic/patches-3.10/864-gpiommc_configfs_locking.patch b/target/linux/generic/patches-3.10/864-gpiommc_configfs_locking.patch index d4201eb508..92815d91f4 100644 --- a/target/linux/generic/patches-3.10/864-gpiommc_configfs_locking.patch +++ b/target/linux/generic/patches-3.10/864-gpiommc_configfs_locking.patch @@ -37,7 +37,7 @@ does not lock access between files. + mutex_lock(&dev->mutex); + if (attr == &gpiommc_attr_register) { - err = strict_strtoul(page, 10, &data); + err = kstrtoul(page, 10, &data); if (err) @@ -478,6 +486,8 @@ static ssize_t gpiommc_config_attr_store WARN_ON(1); diff --git a/target/linux/generic/patches-3.3/863-gpiommc.patch b/target/linux/generic/patches-3.3/863-gpiommc.patch index 32606711f5..5e5325f197 100644 --- a/target/linux/generic/patches-3.3/863-gpiommc.patch +++ b/target/linux/generic/patches-3.3/863-gpiommc.patch @@ -357,7 +357,7 @@ + unsigned long data; + + if (attr == &gpiommc_attr_register) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -378,7 +378,7 @@ + } + + if (attr == &gpiommc_attr_DI) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -389,7 +389,7 @@ + goto out; + } + if (attr == &gpiommc_attr_DO) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -400,7 +400,7 @@ + goto out; + } + if (attr == &gpiommc_attr_CLK) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -411,7 +411,7 @@ + goto out; + } + if (attr == &gpiommc_attr_CS) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -422,7 +422,7 @@ + goto out; + } + if (attr == &gpiommc_attr_CS_activelow) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -433,7 +433,7 @@ + goto out; + } + if (attr == &gpiommc_attr_spimode) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -457,7 +457,7 @@ + goto out; + } + if (attr == &gpiommc_attr_spidelay) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -468,7 +468,7 @@ + goto out; + } + if (attr == &gpiommc_attr_max_bus_speed) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; diff --git a/target/linux/generic/patches-3.3/864-gpiommc_configfs_locking.patch b/target/linux/generic/patches-3.3/864-gpiommc_configfs_locking.patch index d4201eb508..92815d91f4 100644 --- a/target/linux/generic/patches-3.3/864-gpiommc_configfs_locking.patch +++ b/target/linux/generic/patches-3.3/864-gpiommc_configfs_locking.patch @@ -37,7 +37,7 @@ does not lock access between files. + mutex_lock(&dev->mutex); + if (attr == &gpiommc_attr_register) { - err = strict_strtoul(page, 10, &data); + err = kstrtoul(page, 10, &data); if (err) @@ -478,6 +486,8 @@ static ssize_t gpiommc_config_attr_store WARN_ON(1); diff --git a/target/linux/generic/patches-3.6/863-gpiommc.patch b/target/linux/generic/patches-3.6/863-gpiommc.patch index 2e8d4da123..f0e2b4f15f 100644 --- a/target/linux/generic/patches-3.6/863-gpiommc.patch +++ b/target/linux/generic/patches-3.6/863-gpiommc.patch @@ -357,7 +357,7 @@ + unsigned long data; + + if (attr == &gpiommc_attr_register) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -378,7 +378,7 @@ + } + + if (attr == &gpiommc_attr_DI) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -389,7 +389,7 @@ + goto out; + } + if (attr == &gpiommc_attr_DO) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -400,7 +400,7 @@ + goto out; + } + if (attr == &gpiommc_attr_CLK) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -411,7 +411,7 @@ + goto out; + } + if (attr == &gpiommc_attr_CS) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -422,7 +422,7 @@ + goto out; + } + if (attr == &gpiommc_attr_CS_activelow) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -433,7 +433,7 @@ + goto out; + } + if (attr == &gpiommc_attr_spimode) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -457,7 +457,7 @@ + goto out; + } + if (attr == &gpiommc_attr_spidelay) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -468,7 +468,7 @@ + goto out; + } + if (attr == &gpiommc_attr_max_bus_speed) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; diff --git a/target/linux/generic/patches-3.6/864-gpiommc_configfs_locking.patch b/target/linux/generic/patches-3.6/864-gpiommc_configfs_locking.patch index d4201eb508..92815d91f4 100644 --- a/target/linux/generic/patches-3.6/864-gpiommc_configfs_locking.patch +++ b/target/linux/generic/patches-3.6/864-gpiommc_configfs_locking.patch @@ -37,7 +37,7 @@ does not lock access between files. + mutex_lock(&dev->mutex); + if (attr == &gpiommc_attr_register) { - err = strict_strtoul(page, 10, &data); + err = kstrtoul(page, 10, &data); if (err) @@ -478,6 +486,8 @@ static ssize_t gpiommc_config_attr_store WARN_ON(1); diff --git a/target/linux/generic/patches-3.8/863-gpiommc.patch b/target/linux/generic/patches-3.8/863-gpiommc.patch index f275c65a35..5f74f1bc7c 100644 --- a/target/linux/generic/patches-3.8/863-gpiommc.patch +++ b/target/linux/generic/patches-3.8/863-gpiommc.patch @@ -357,7 +357,7 @@ + unsigned long data; + + if (attr == &gpiommc_attr_register) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -378,7 +378,7 @@ + } + + if (attr == &gpiommc_attr_DI) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -389,7 +389,7 @@ + goto out; + } + if (attr == &gpiommc_attr_DO) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -400,7 +400,7 @@ + goto out; + } + if (attr == &gpiommc_attr_CLK) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -411,7 +411,7 @@ + goto out; + } + if (attr == &gpiommc_attr_CS) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -422,7 +422,7 @@ + goto out; + } + if (attr == &gpiommc_attr_CS_activelow) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -433,7 +433,7 @@ + goto out; + } + if (attr == &gpiommc_attr_spimode) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -457,7 +457,7 @@ + goto out; + } + if (attr == &gpiommc_attr_spidelay) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -468,7 +468,7 @@ + goto out; + } + if (attr == &gpiommc_attr_max_bus_speed) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; diff --git a/target/linux/generic/patches-3.8/864-gpiommc_configfs_locking.patch b/target/linux/generic/patches-3.8/864-gpiommc_configfs_locking.patch index d4201eb508..92815d91f4 100644 --- a/target/linux/generic/patches-3.8/864-gpiommc_configfs_locking.patch +++ b/target/linux/generic/patches-3.8/864-gpiommc_configfs_locking.patch @@ -37,7 +37,7 @@ does not lock access between files. + mutex_lock(&dev->mutex); + if (attr == &gpiommc_attr_register) { - err = strict_strtoul(page, 10, &data); + err = kstrtoul(page, 10, &data); if (err) @@ -478,6 +486,8 @@ static ssize_t gpiommc_config_attr_store WARN_ON(1); diff --git a/target/linux/generic/patches-3.9/863-gpiommc.patch b/target/linux/generic/patches-3.9/863-gpiommc.patch index d431ad3154..8dd546d1b0 100644 --- a/target/linux/generic/patches-3.9/863-gpiommc.patch +++ b/target/linux/generic/patches-3.9/863-gpiommc.patch @@ -357,7 +357,7 @@ + unsigned long data; + + if (attr == &gpiommc_attr_register) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -378,7 +378,7 @@ + } + + if (attr == &gpiommc_attr_DI) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -389,7 +389,7 @@ + goto out; + } + if (attr == &gpiommc_attr_DO) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -400,7 +400,7 @@ + goto out; + } + if (attr == &gpiommc_attr_CLK) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -411,7 +411,7 @@ + goto out; + } + if (attr == &gpiommc_attr_CS) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -422,7 +422,7 @@ + goto out; + } + if (attr == &gpiommc_attr_CS_activelow) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -433,7 +433,7 @@ + goto out; + } + if (attr == &gpiommc_attr_spimode) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -457,7 +457,7 @@ + goto out; + } + if (attr == &gpiommc_attr_spidelay) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; @@ -468,7 +468,7 @@ + goto out; + } + if (attr == &gpiommc_attr_max_bus_speed) { -+ err = strict_strtoul(page, 10, &data); ++ err = kstrtoul(page, 10, &data); + if (err) + goto out; + err = -EINVAL; diff --git a/target/linux/generic/patches-3.9/864-gpiommc_configfs_locking.patch b/target/linux/generic/patches-3.9/864-gpiommc_configfs_locking.patch index d4201eb508..92815d91f4 100644 --- a/target/linux/generic/patches-3.9/864-gpiommc_configfs_locking.patch +++ b/target/linux/generic/patches-3.9/864-gpiommc_configfs_locking.patch @@ -37,7 +37,7 @@ does not lock access between files. + mutex_lock(&dev->mutex); + if (attr == &gpiommc_attr_register) { - err = strict_strtoul(page, 10, &data); + err = kstrtoul(page, 10, &data); if (err) @@ -478,6 +486,8 @@ static ssize_t gpiommc_config_attr_store WARN_ON(1); -- 2.30.2