aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 }