From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
To: netdev@vger.kernel.org
Cc: eric.dumazet@gmail.com, bhutchings@solarflare.com,
rayagond@vayavyalabs.com, davem@davemloft.net,
yuvalmin@broadcom.com,
Giuseppe Cavallaro <peppe.cavallaro@st.com>
Subject: [net-next.git 1/4 (v3)] stmmac: do not use strict_strtoul but kstrtoint
Date: Wed, 20 Jun 2012 08:12:51 +0200 [thread overview]
Message-ID: <1340172774-27443-2-git-send-email-peppe.cavallaro@st.com> (raw)
In-Reply-To: <1340172774-27443-1-git-send-email-peppe.cavallaro@st.com>
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>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 27 +++++++-------------
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 590e95b..eba49cb 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)
return -EINVAL;
while ((opt = strsep(&str, ",")) != NULL) {
if (!strncmp(opt, "debug:", 6)) {
- if (strict_strtoul(opt + 6, 0, (unsigned long *)&debug))
+ if (kstrtoint(opt + 6, 0, &debug))
goto err;
} else if (!strncmp(opt, "phyaddr:", 8)) {
- if (strict_strtoul(opt + 8, 0,
- (unsigned long *)&phyaddr))
+ if (kstrtoint(opt + 8, 0, &phyaddr))
goto err;
} else if (!strncmp(opt, "dma_txsize:", 11)) {
- if (strict_strtoul(opt + 11, 0,
- (unsigned long *)&dma_txsize))
+ if (kstrtoint(opt + 11, 0, &dma_txsize))
goto err;
} else if (!strncmp(opt, "dma_rxsize:", 11)) {
- if (strict_strtoul(opt + 11, 0,
- (unsigned long *)&dma_rxsize))
+ if (kstrtoint(opt + 11, 0, &dma_rxsize))
goto err;
} else if (!strncmp(opt, "buf_sz:", 7)) {
- if (strict_strtoul(opt + 7, 0,
- (unsigned long *)&buf_sz))
+ if (kstrtoint(opt + 7, 0, &buf_sz))
goto err;
} else if (!strncmp(opt, "tc:", 3)) {
- if (strict_strtoul(opt + 3, 0, (unsigned long *)&tc))
+ if (kstrtoint(opt + 3, 0, &tc))
goto err;
} else if (!strncmp(opt, "watchdog:", 9)) {
- if (strict_strtoul(opt + 9, 0,
- (unsigned long *)&watchdog))
+ if (kstrtoint(opt + 9, 0, &watchdog))
goto err;
} else if (!strncmp(opt, "flow_ctrl:", 10)) {
- if (strict_strtoul(opt + 10, 0,
- (unsigned long *)&flow_ctrl))
+ if (kstrtoint(opt + 10, 0, &flow_ctrl))
goto err;
} else if (!strncmp(opt, "pause:", 6)) {
- if (strict_strtoul(opt + 6, 0, (unsigned long *)&pause))
+ if (kstrtoint(opt + 6, 0, &pause))
goto err;
#ifdef CONFIG_STMMAC_TIMER
} else if (!strncmp(opt, "tmrate:", 7)) {
- if (strict_strtoul(opt + 7, 0,
- (unsigned long *)&tmrate))
+ if (kstrtoint(opt + 7, 0, &tmrate))
goto err;
#endif
}
--
1.7.4.4
next prev parent reply other threads:[~2012-06-20 6:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-20 6:12 [net-next.git 0/4] EEE for PAL and stmmac (V5) Giuseppe CAVALLARO
2012-06-20 6:12 ` Giuseppe CAVALLARO [this message]
2012-06-20 6:12 ` [net-next.git 2/4] stmmac: update the driver Documentation and add EEE Giuseppe CAVALLARO
2012-06-20 6:12 ` [net-next.git 3/4 (v5)] stmmac: add the Energy Efficient Ethernet support Giuseppe CAVALLARO
2012-06-20 6:12 ` [net-next.git 4/4 (v7)] phy: add the EEE support and the way to access to the MMD registers Giuseppe CAVALLARO
2012-06-20 17:22 ` Ben Hutchings
-- strict thread matches above, loose matches on Subject: below --
2012-06-28 7:14 [net-next.git 0/4] EEE for PAL and stmmac (V7) Giuseppe CAVALLARO
2012-06-28 7:14 ` [net-next.git 1/4 (v3)] stmmac: do not use strict_strtoul but kstrtoint Giuseppe CAVALLARO
2012-06-21 6:03 [net-next.git 0/4] EEE for PAL and stmmac (V6) Giuseppe CAVALLARO
2012-06-21 6:03 ` [net-next.git 1/4 (v3)] stmmac: do not use strict_strtoul but kstrtoint Giuseppe CAVALLARO
2012-06-18 6:49 [net-next.git 0/4] EEE for PAL and stmmac (V4) Giuseppe CAVALLARO
2012-06-18 6:49 ` [net-next.git 1/4 (v3)] stmmac: do not use strict_strtoul but kstrtoint Giuseppe CAVALLARO
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1340172774-27443-2-git-send-email-peppe.cavallaro@st.com \
--to=peppe.cavallaro@st.com \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rayagond@vayavyalabs.com \
--cc=yuvalmin@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox