aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGiuseppe CAVALLARO <peppe.cavallaro@st.com>2012-06-27 17:14:35 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-01 06:34:49 -0400
commitea2ab8711b8a4363e3b3ee0dc609d1b3c8b92899 (patch)
treee6ccbd1015a236a077fe29d5c91db482fbdc4b39 /drivers
parentc801e3cc1925e02fa7213889306d4d77e6ad1550 (diff)
stmmac: do not use strict_strtoul but kstrtoint
This patch replaces the obsolete strict_strtoul with kstrtoint. v2: also removed casting on kstrtoul. v3: use kstrtoint instead of kstrtoul due to all vars are integer. thanks to E. Dumazet. Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 590e95b4cbf..eba49cb810f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2129,42 +2129,35 @@ static int __init stmmac_cmdline_opt(char *str)
2129 return -EINVAL; 2129 return -EINVAL;
2130 while ((opt = strsep(&str, ",")) != NULL) { 2130 while ((opt = strsep(&str, ",")) != NULL) {
2131 if (!strncmp(opt, "debug:", 6)) { 2131 if (!strncmp(opt, "debug:", 6)) {
2132 if (strict_strtoul(opt + 6, 0, (unsigned long *)&debug)) 2132 if (kstrtoint(opt + 6, 0, &debug))
2133 goto err; 2133 goto err;
2134 } else if (!strncmp(opt, "phyaddr:", 8)) { 2134 } else if (!strncmp(opt, "phyaddr:", 8)) {
2135 if (strict_strtoul(opt + 8, 0, 2135 if (kstrtoint(opt + 8, 0, &phyaddr))
2136 (unsigned long *)&phyaddr))
2137 goto err; 2136 goto err;
2138 } else if (!strncmp(opt, "dma_txsize:", 11)) { 2137 } else if (!strncmp(opt, "dma_txsize:", 11)) {
2139 if (strict_strtoul(opt + 11, 0, 2138 if (kstrtoint(opt + 11, 0, &dma_txsize))
2140 (unsigned long *)&dma_txsize))
2141 goto err; 2139 goto err;
2142 } else if (!strncmp(opt, "dma_rxsize:", 11)) { 2140 } else if (!strncmp(opt, "dma_rxsize:", 11)) {
2143 if (strict_strtoul(opt + 11, 0, 2141 if (kstrtoint(opt + 11, 0, &dma_rxsize))
2144 (unsigned long *)&dma_rxsize))
2145 goto err; 2142 goto err;
2146 } else if (!strncmp(opt, "buf_sz:", 7)) { 2143 } else if (!strncmp(opt, "buf_sz:", 7)) {
2147 if (strict_strtoul(opt + 7, 0, 2144 if (kstrtoint(opt + 7, 0, &buf_sz))
2148 (unsigned long *)&buf_sz))
2149 goto err; 2145 goto err;
2150 } else if (!strncmp(opt, "tc:", 3)) { 2146 } else if (!strncmp(opt, "tc:", 3)) {
2151 if (strict_strtoul(opt + 3, 0, (unsigned long *)&tc)) 2147 if (kstrtoint(opt + 3, 0, &tc))
2152 goto err; 2148 goto err;
2153 } else if (!strncmp(opt, "watchdog:", 9)) { 2149 } else if (!strncmp(opt, "watchdog:", 9)) {
2154 if (strict_strtoul(opt + 9, 0, 2150 if (kstrtoint(opt + 9, 0, &watchdog))
2155 (unsigned long *)&watchdog))
2156 goto err; 2151 goto err;
2157 } else if (!strncmp(opt, "flow_ctrl:", 10)) { 2152 } else if (!strncmp(opt, "flow_ctrl:", 10)) {
2158 if (strict_strtoul(opt + 10, 0, 2153 if (kstrtoint(opt + 10, 0, &flow_ctrl))
2159 (unsigned long *)&flow_ctrl))
2160 goto err; 2154 goto err;
2161 } else if (!strncmp(opt, "pause:", 6)) { 2155 } else if (!strncmp(opt, "pause:", 6)) {
2162 if (strict_strtoul(opt + 6, 0, (unsigned long *)&pause)) 2156 if (kstrtoint(opt + 6, 0, &pause))
2163 goto err; 2157 goto err;
2164#ifdef CONFIG_STMMAC_TIMER 2158#ifdef CONFIG_STMMAC_TIMER
2165 } else if (!strncmp(opt, "tmrate:", 7)) { 2159 } else if (!strncmp(opt, "tmrate:", 7)) {
2166 if (strict_strtoul(opt + 7, 0, 2160 if (kstrtoint(opt + 7, 0, &tmrate))
2167 (unsigned long *)&tmrate))
2168 goto err; 2161 goto err;
2169#endif 2162#endif
2170 } 2163 }