lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1422821222-24079-2-git-send-email-sheetal.tigadoli@gmail.com>
Date:	Mon,  2 Feb 2015 01:36:58 +0530
From:	Sheetal Tigadoli <sheetal.tigadoli@...il.com>
To:	chris@...ntf.net
Cc:	joe@...ches.com, linux-mmc@...r.kernel.org, ben@...adent.org.uk,
	kuninori.morimoto.gx@...esas.com, ulf.hansson@...aro.org,
	linux-kernel@...r.kernel.org,
	Sheetal Tigadoli <sheetal.tigadoli@...il.com>
Subject: [PATCH 1/5] drivers: mmc: card: Fix replaces simple_strtoul func call with kstrtoul

This patch fixes following coding style warning in file block.c

        drivers/mmc/card/block.c:279: WARNING: simple_strtoul is obsolete, use kstrtoul instead

Signed-off-by: Sheetal Tigadoli <sheetal.tigadoli@...il.com>
---
 drivers/mmc/card/block.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index c69afb5..80f7b4b 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -274,13 +274,12 @@ static ssize_t force_ro_store(struct device *dev, struct device_attribute *attr,
 			      const char *buf, size_t count)
 {
 	int ret;
-	char *end;
 	struct mmc_blk_data *md = mmc_blk_get(dev_to_disk(dev));
-	unsigned long set = simple_strtoul(buf, &end, 0);
-	if (end == buf) {
-		ret = -EINVAL;
+	unsigned long set;
+
+	ret = kstrtoul(buf, 0, &set);
+	if ((ret == -EINVAL) || (ret == -ERANGE))
 		goto out;
-	}
 
 	set_disk_ro(dev_to_disk(dev), set || md->read_only);
 	ret = count;
-- 
1.7.9.5

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ