All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Quadros <roger.quadros@nokia.com>
To: ext Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Hunter Adrian (Nokia-MS/Helsinki)" <adrian.hunter@nokia.com>,
	"Shevchenko Andriy (EXT-Teleca/Helsinki)"
	<ext-andriy.shevchenko@nokia.com>
Subject: Re: [PATCH 2/3] mmc_test: change simple_strtol() to strict_strtol()
Date: Wed, 01 Sep 2010 11:25:30 +0300	[thread overview]
Message-ID: <4C7E0DFA.2090403@nokia.com> (raw)
In-Reply-To: <e144c2087fbdfd718b5caeac4eb7d0a7ce4896e0.1283276161.git.ext-andriy.shevchenko@nokia.com>

Hi,

On 09/01/2010 09:26 AM, ext Andy Shevchenko wrote:

No patch summary?
> Signed-off-by: Andy Shevchenko<ext-andriy.shevchenko@nokia.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;

Why this change? isn't unsigned int sufficient for the mmc test cases?

> +	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))
space required                    ^ here

> +		return -EINVAL;
>
>   	test = kzalloc(sizeof(struct mmc_test_card), GFP_KERNEL);
>   	if (!test)


-- 
regards,
-roger

  reply	other threads:[~2010-09-01  8:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-01  6:26 [PATCH 0/3] mmc_test: show test results via sysfs Andy Shevchenko
2010-09-01  6:26 ` [PATCH 1/3] mmc_test: use API to check card type Andy Shevchenko
2010-09-01  6:26 ` [PATCH 2/3] mmc_test: change simple_strtol() to strict_strtol() Andy Shevchenko
2010-09-01  8:25   ` Roger Quadros [this message]
2010-09-01  8:43     ` Andy Shevchenko
2010-09-01  6:26 ` [PATCH 3/3] mmc_test: collect data and show it via sysfs by demand Andy Shevchenko
2010-09-01 21:46 ` [PATCH 0/3] mmc_test: show test results via sysfs Chris Ball
2010-09-01 23:30   ` Chris Ball

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=4C7E0DFA.2090403@nokia.com \
    --to=roger.quadros@nokia.com \
    --cc=adrian.hunter@nokia.com \
    --cc=akpm@linux-foundation.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=ext-andriy.shevchenko@nokia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.