[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <e144c2087fbdfd718b5caeac4eb7d0a7ce4896e0.1283276161.git.ext-andriy.shevchenko@nokia.com>
Date: Wed, 1 Sep 2010 09:26:46 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Adrian Hunter <adrian.hunter@...ia.com>,
Andy Shevchenko <ext-andriy.shevchenko@...ia.com>
Subject: [PATCH 2/3] mmc_test: change simple_strtol() to strict_strtol()
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@...ia.com>
---
drivers/mmc/card/mmc_test.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c
index 359fae9..5423ac9 100644
--- a/drivers/mmc/card/mmc_test.c
+++ b/drivers/mmc/card/mmc_test.c
@@ -1836,9 +1836,10 @@ static const struct mmc_test_case mmc_test_cases[] = {
static DEFINE_MUTEX(mmc_test_lock);
-static void mmc_test_run(struct mmc_test_card *test, int testcase)
+static void mmc_test_run(struct mmc_test_card *test, long testcase)
{
- int i, ret;
+ long i;
+ int ret;
printk(KERN_INFO "%s: Starting tests of card %s...\n",
mmc_hostname(test->card->host), mmc_card_id(test->card));
@@ -1849,7 +1850,7 @@ static void mmc_test_run(struct mmc_test_card *test, int testcase)
if (testcase && ((i + 1) != testcase))
continue;
- printk(KERN_INFO "%s: Test case %d. %s...\n",
+ printk(KERN_INFO "%s: Test case %ld. %s...\n",
mmc_hostname(test->card->host), i + 1,
mmc_test_cases[i].name);
@@ -1920,9 +1921,10 @@ static ssize_t mmc_test_store(struct device *dev,
{
struct mmc_card *card = mmc_dev_to_card(dev);
struct mmc_test_card *test;
- int testcase;
+ long testcase;
- testcase = simple_strtol(buf, NULL, 10);
+ if (strict_strtol(buf, 10, &testcase))
+ return -EINVAL;
test = kzalloc(sizeof(struct mmc_test_card), GFP_KERNEL);
if (!test)
--
1.6.3.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists