From: Alexey Dobriyan <adobriyan@gmail.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, adobriyan@gmail.com
Subject: [PATCH 45/52] kstrtox: convert arm
Date: Sat, 5 Feb 2011 16:20:48 +0200 [thread overview]
Message-ID: <1296915654-7458-45-git-send-email-adobriyan@gmail.com> (raw)
In-Reply-To: <1296915654-7458-1-git-send-email-adobriyan@gmail.com>
In arch/arm/mach-omap2/board-omap3touchbook.c:
remove "tbr" parameter, it's unused.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
arch/arm/mach-omap2/board-omap3touchbook.c | 11 -----------
arch/arm/mach-omap2/mux.c | 15 ++++++---------
arch/arm/mach-pxa/balloon3.c | 2 +-
arch/arm/mach-pxa/viper.c | 3 +--
arch/arm/mach-s3c2412/mach-jive.c | 2 +-
arch/arm/mach-ux500/mbox-db5500.c | 27 ++++++++-------------------
arch/arm/mach-w90x900/cpu.c | 5 +++--
arch/arm/plat-omap/mcbsp.c | 4 ++--
8 files changed, 22 insertions(+), 47 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index db1f74f..16f334f 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -62,8 +62,6 @@
#define TB_BL_PWM_TIMER 9
#define TB_KILL_POWER_GPIO 168
-static unsigned long touchbook_revision;
-
static struct mtd_partition omap3touchbook_nand_partitions[] = {
/* All the partition sizes are listed in terms of NAND block size */
{
@@ -493,15 +491,6 @@ static void omap3_touchbook_poweroff(void)
gpio_direction_output(TB_KILL_POWER_GPIO, 0);
}
-static int __init early_touchbook_revision(char *p)
-{
- if (!p)
- return 0;
-
- return strict_strtoul(p, 10, &touchbook_revision);
-}
-early_param("tbr", early_touchbook_revision);
-
static struct omap_musb_board_data musb_board_data = {
.interface_type = MUSB_INTERFACE_ULPI,
.mode = MUSB_OTG,
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index fae49d1..ab5087a 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -548,7 +548,7 @@ static ssize_t omap_mux_dbg_signal_write(struct file *file,
char buf[OMAP_MUX_MAX_ARG_CHAR];
struct seq_file *seqf;
struct omap_mux *m;
- unsigned long val;
+ u16 val;
int buf_size, ret;
struct omap_mux_partition *partition;
@@ -561,13 +561,10 @@ static ssize_t omap_mux_dbg_signal_write(struct file *file,
if (copy_from_user(buf, user_buf, buf_size))
return -EFAULT;
- ret = strict_strtoul(buf, 0x10, &val);
+ ret = kstrtou16(buf, 0x10, &val);
if (ret < 0)
return ret;
- if (val > 0xffff)
- return -EINVAL;
-
seqf = file->private_data;
m = seqf->private;
@@ -575,7 +572,7 @@ static ssize_t omap_mux_dbg_signal_write(struct file *file,
if (!partition)
return -ENODEV;
- omap_mux_write(partition, (u16)val, m->reg_offset);
+ omap_mux_write(partition, val, m->reg_offset);
*ppos += count;
return count;
@@ -770,18 +767,18 @@ static void __init omap_mux_set_cmdline_signals(void)
while ((token = strsep(&next_opt, ",")) != NULL) {
char *keyval, *name;
- unsigned long val;
keyval = token;
name = strsep(&keyval, "=");
if (name) {
+ u16 val;
int res;
- res = strict_strtoul(keyval, 0x10, &val);
+ res = kstrtou16(keyval, 0x10, &val);
if (res < 0)
continue;
- omap_mux_init_signal(name, (u16)val);
+ omap_mux_init_signal(name, val);
}
}
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index a134a14..077fdc0 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -91,7 +91,7 @@ int __init parse_balloon3_features(char *arg)
if (!arg)
return 0;
- return strict_strtoul(arg, 0, &balloon3_features_present);
+ return kstrtoul(arg, 0, &balloon3_features_present);
}
early_param("balloon3_features", parse_balloon3_features);
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
index 49eeeab..bed35b8 100644
--- a/arch/arm/mach-pxa/viper.c
+++ b/arch/arm/mach-pxa/viper.c
@@ -767,8 +767,7 @@ static unsigned long viper_tpm;
static int __init viper_tpm_setup(char *str)
{
- strict_strtoul(str, 10, &viper_tpm);
- return 1;
+ return !kstrtoul(str, 10, &viper_tpm);
}
__setup("tpm=", viper_tpm_setup);
diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c
index 923e01b..a21b119 100644
--- a/arch/arm/mach-s3c2412/mach-jive.c
+++ b/arch/arm/mach-s3c2412/mach-jive.c
@@ -240,7 +240,7 @@ static int __init jive_mtdset(char *options)
if (options == NULL || options[0] == '\0')
return 0;
- if (strict_strtoul(options, 10, &set)) {
+ if (kstrtoul(options, 10, &set)) {
printk(KERN_ERR "failed to parse mtdset=%s\n", options);
return 0;
}
diff --git a/arch/arm/mach-ux500/mbox-db5500.c b/arch/arm/mach-ux500/mbox-db5500.c
index cbf1571..9c7b832 100644
--- a/arch/arm/mach-ux500/mbox-db5500.c
+++ b/arch/arm/mach-ux500/mbox-db5500.c
@@ -122,29 +122,18 @@ static ssize_t mbox_write_fifo(struct device *dev,
const char *buf,
size_t count)
{
- unsigned long mbox_mess;
- unsigned long nbr_sends;
- unsigned long i;
- char int_buf[16];
- char *token;
- char *val;
-
struct mbox *mbox = (struct mbox *) dev->platform_data;
+ unsigned int mbox_mess, nbr_sends;
+ unsigned int i;
- strncpy((char *) &int_buf, buf, sizeof(int_buf));
- token = (char *) &int_buf;
-
- /* Parse message */
- val = strsep(&token, " ");
- if ((val == NULL) || (strict_strtoul(val, 16, &mbox_mess) != 0))
- mbox_mess = 0xDEADBEEF;
-
- val = strsep(&token, " ");
- if ((val == NULL) || (strict_strtoul(val, 10, &nbr_sends) != 0))
+ if (sscanf(buf, "%u %u", &mbox_mess, &nbr_sends) != 2) {
nbr_sends = 1;
+ if (sscanf(buf, "%u", &mbox_mess) != 1)
+ return -EINVAL;
+ }
- dev_dbg(dev, "Will write 0x%lX %ld times using data struct at 0x%X\n",
- mbox_mess, nbr_sends, (u32) mbox);
+ dev_dbg(dev, "Will write 0x%X %u times using data struct at %p\n",
+ mbox_mess, nbr_sends, mbox);
for (i = 0; i < nbr_sends; i++)
mbox_send(mbox, mbox_mess, true);
diff --git a/arch/arm/mach-w90x900/cpu.c b/arch/arm/mach-w90x900/cpu.c
index 83c5632..67f015c 100644
--- a/arch/arm/mach-w90x900/cpu.c
+++ b/arch/arm/mach-w90x900/cpu.c
@@ -170,12 +170,13 @@ static int __init nuc900_set_clkval(unsigned int cpufreq)
}
static int __init nuc900_set_cpufreq(char *str)
{
- unsigned long cpufreq, val;
+ unsigned int cpufreq, val;
if (!*str)
return 0;
- strict_strtoul(str, 0, &cpufreq);
+ if (kstrtouint(str, 0, &cpufreq) < 0)
+ return 0;
nuc900_clock_source(NULL, "ext");
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index b5a6e17..09e4015 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -1485,10 +1485,10 @@ static ssize_t prop##_store(struct device *dev, \
const char *buf, size_t size) \
{ \
struct omap_mcbsp *mcbsp = dev_get_drvdata(dev); \
- unsigned long val; \
+ u16 val; \
int status; \
\
- status = strict_strtoul(buf, 0, &val); \
+ status = kstrtou16(buf, 0, &val); \
if (status) \
return status; \
\
--
1.7.3.4
next prev parent reply other threads:[~2011-02-05 14:23 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-05 14:20 [PATCH 01/52] kstrtox: converting strings to integers done (hopefully) right Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 02/52] kstrtox: convert kernel/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 03/52] kstrtox: convert kernel/trace/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 04/52] kstrtox: convert mm/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 05/52] kstrtox: convert block/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 06/52] kstrtox: convert security/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 07/52] kstrtox: convert fs/fuse/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 08/52] kstrtox: convert fs/nfs/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 09/52] kstrtox: convert fs/proc/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 10/52] kstrtox: convert drivers/acpi/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 11/52] kstrtox: convert drivers/ata/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 12/52] kstrtox: convert drivers/base/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 13/52] kstrtox: convert drivers/block/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 14/52] kstrtox: convert drivers/bluetooth/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 15/52] kstrtox: convert drivers/clocksource/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 16/52] kstrtox: convert drivers/edac/ Alexey Dobriyan
2011-02-05 17:34 ` Borislav Petkov
2011-02-06 18:52 ` Alexey Dobriyan
2011-02-07 9:43 ` Borislav Petkov
2011-02-05 14:20 ` [PATCH 17/52] kstrtox: convert drivers/gpio/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 18/52] kstrtox: convert drivers/gpu/drm/nouveau/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 19/52] kstrtox: convert drivers/hid/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 20/52] kstrtox: convert drivers/hwmon/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 21/52] kstrtox: convert drivers/ide/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 22/52] kstrtox: convert drivers/infiniband/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 23/52] kstrtox: convert drivers/input/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 24/52] kstrtox: convert drivers/isdn/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 25/52] kstrtox: convert drivers/leds/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 26/52] kstrtox: convert drivers/macintosh/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 27/52] kstrtox: convert drivers/md/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 28/52] kstrtox: convert drivers/mfd/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 29/52] kstrtox: convert drivers/misc/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 30/52] kstrtox: convert drivers/mmc/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 31/52] kstrtox: convert drivers/net/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 32/52] kstrtox: convert drivers/net/wireless/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 33/52] kstrtox: convert drivers/pci/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 34/52] kstrtox: convert drivers/power/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 35/52] kstrtox: convert drivers/regulator/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 36/52] kstrtox: convert drivers/rtc/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 37/52] kstrtox: convert drivers/scsi/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 38/52] kstrtox: convert drivers/ssb/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 39/52] kstrtox: convert drivers/target/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 40/52] kstrtox: convert drivers/usb/ Alexey Dobriyan
2011-04-14 10:31 ` [40/52] " Michal Nazarewicz
2011-02-05 14:20 ` [PATCH 41/52] kstrtox: convert drivers/video/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 42/52] kstrtox: convert drivers/w1/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 43/52] kstrtox: convert sound/ Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 44/52] kstrtox: convert net/ Alexey Dobriyan
2011-02-05 14:20 ` Alexey Dobriyan [this message]
2011-02-05 14:20 ` [PATCH 46/52] kstrtox: convert microblaze Alexey Dobriyan
2011-02-10 13:55 ` Michal Simek
2011-02-05 14:20 ` [PATCH 47/52] kstrtox: convert mips Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 48/52] kstrtox: convert powerpc Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 49/52] kstrtox: convert s390 Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 50/52] kstrtox: convert tile Alexey Dobriyan
2011-02-05 14:20 ` [PATCH 51/52] kstrtox: convert x86 Alexey Dobriyan
2011-02-05 14:33 ` [PATCH 01/52] kstrtox: converting strings to integers done (hopefully) right Geert Uytterhoeven
2011-02-05 14:40 ` Alexey Dobriyan
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=1296915654-7458-45-git-send-email-adobriyan@gmail.com \
--to=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).