From patchwork Mon Sep 6 08:12:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot for Andy Shevchenko X-Patchwork-Id: 177942 Return-path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on void.printf.net X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.9 tests=RCVD_IN_DNSWL_LOW autolearn=disabled version=3.2.5 Envelope-to: chris@printf.net Delivery-date: Mon, 06 Sep 2010 09:12:08 +0100 Received: from lists.laptop.org ([18.85.2.145] helo=mail.laptop.org) by void.printf.net with esmtp (Exim 4.69) (envelope-from ) id 1OsWoC-0007c6-1p for chris@printf.net; Mon, 06 Sep 2010 09:12:08 +0100 Received: by mail.laptop.org (Postfix) id 6338824148; Mon, 6 Sep 2010 04:11:48 -0400 (EDT) Delivered-To: cjb@laptop.org Received: from spam.laptop.org (spam.laptop.org [18.85.46.23]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.laptop.org (Postfix) with ESMTPS id 0A43524146 for ; Mon, 6 Sep 2010 04:11:48 -0400 (EDT) X-ASG-Debug-ID: 1283760724-0b74c9380001-zHW3sV Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by spam.laptop.org with ESMTP id m6Tc1WqiF1uYmLtV for ; Mon, 06 Sep 2010 04:12:05 -0400 (EDT) X-Barracuda-Envelope-From: linux-mmc-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751860Ab0IFIME (ORCPT ); Mon, 6 Sep 2010 04:12:04 -0400 Received: from mgw-sa02.nokia.com ([147.243.1.48]:62514 "EHLO mgw-sa02.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790Ab0IFIMD (ORCPT ); Mon, 6 Sep 2010 04:12:03 -0400 Received: from nokia.com (localhost [127.0.0.1]) by mgw-sa02.nokia.com (Switch-3.4.3/Switch-3.4.3) with ESMTP id o868BtSN003746; Mon, 6 Sep 2010 11:11:55 +0300 Received: from fs-test.research.nokia.com ([esdhcp05135.research.nokia.com [172.21.51.35]]) by mgw-sa02.nokia.com with ESMTP id o868BqUb003649 ; Mon, 6 Sep 2010 11:11:53 +0300 Received: by fs-test.research.nokia.com (Postfix, from userid 1001) id 1BB26D1BAA; Mon, 6 Sep 2010 11:12:22 +0300 (EEST) From: Andy Shevchenko To: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Hunter Adrian , Chris Ball , Andy Shevchenko X-ASG-Orig-Subj: [PATCHv5 2/3] mmc_test: change simple_strtol() to strict_strtol() Subject: [PATCHv5 2/3] mmc_test: change simple_strtol() to strict_strtol() Date: Mon, 6 Sep 2010 11:12:18 +0300 Message-Id: <59ad4bca0f707b11525dcdbe65dd117d964e4523.1283760476.git.ext-andriy.shevchenko@nokia.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <3fa57fe7152b608279ec56dcfe969a42b672a197.1283760476.git.ext-andriy.shevchenko@nokia.com> In-Reply-To: <3fa57fe7152b608279ec56dcfe969a42b672a197.1283760476.git.ext-andriy.shevchenko@nokia.com> References: <3fa57fe7152b608279ec56dcfe969a42b672a197.1283760476.git.ext-andriy.shevchenko@nokia.com> References: <3fa57fe7152b608279ec56dcfe969a42b672a197.1283760476.git.ext-andriy.shevchenko@nokia.com> X-Nokia-AV: Clean Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Barracuda-Connect: vger.kernel.org[209.132.180.67] X-Barracuda-Start-Time: 1283760724 X-Barracuda-URL: http://18.85.46.23:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at laptop.org X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=5.5 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.40072 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c index cd8edf4..6bffb33 100644 --- a/drivers/mmc/card/mmc_test.c +++ b/drivers/mmc/card/mmc_test.c @@ -1937,9 +1937,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)