mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 3/3] block: Change simple_strtol() to kstrtol()
@ 2018-06-22 11:39 Kitone Elvis Peter
  2018-06-22 11:45 ` kbuild test robot
  2018-06-22 19:51 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Kitone Elvis Peter @ 2018-06-22 11:39 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, linux-kernel

The usage of simple_strtol is discouraged, because
strtol() is obsolete. Instead kstrtol() should be 
used to convert a string into a long integer.  

Signed-off-by: Kitone Elvis Peter <elviskitone@gmail.com>
---
 drivers/block/brd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index e2a1278..4b7a28e 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -351,7 +351,7 @@ MODULE_ALIAS("rd");
 /* Legacy boot options - nonmodular */
 static int __init ramdisk_size(char *str)
 {
-	rd_size = simple_strtol(str, NULL, 0);
+	rd_size = kstrtol(str, NULL, 0);
 	return 1;
 }
 __setup("ramdisk_size=", ramdisk_size);
-- 
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-22 19:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-22 11:39 [PATCH 3/3] block: Change simple_strtol() to kstrtol() Kitone Elvis Peter
2018-06-22 11:45 ` kbuild test robot
2018-06-22 19:51 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®