commit 1a66a08ae82b16eb40705ad112ff28873981af92 Author: majianpeng Date: Fri Jul 27 15:07:59 2012 +0100 dm: replace simple_strtoul Replace obsolete simple_strtoul() with kstrtou8/kstrtouint. Signed-off-by: majianpeng Signed-off-by: Mikulas Patocka Signed-off-by: Alasdair G Kergon --- drivers/md/dm-crypt.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) Index: rhel6-compile/drivers/md/dm-crypt.c =================================================================== --- rhel6-compile.orig/drivers/md/dm-crypt.c 2014-05-10 16:55:08.000000000 +0200 +++ rhel6-compile/drivers/md/dm-crypt.c 2014-05-10 16:55:10.000000000 +0200 @@ -1065,7 +1065,6 @@ static void kcryptd_queue_crypt(struct d static int crypt_decode_key(u8 *key, char *hex, unsigned int size) { char buffer[3]; - char *endp; unsigned int i; buffer[2] = '\0'; @@ -1074,9 +1073,7 @@ static int crypt_decode_key(u8 *key, cha buffer[0] = *hex++; buffer[1] = *hex++; - key[i] = (u8)simple_strtoul(buffer, &endp, 16); - - if (endp != &buffer[2]) + if (kstrtou8(buffer, 16, &key[i])) return -EINVAL; }