btrfs: replace simple_strtoul() with kstrtoul()
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 btrfs: replace simple_strtoul() with kstrtoul()
use the newer and more pleasant kstrtoul() to replace simple_strtoul(), because simple_strtoul() is marked for obsoletion.
--- fs/btrfs/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/ioctl.c +1 -1
@@ -1506,7 +1506,7 @@ static noinline int btrfs_ioctl_resize(struct file *file, sizestr = devstr +1 ; *devstr ='\0' ; devstr = vol_args->name; - devid =simple_strtoull (devstr, &end,10 ); + devid =kstrtoul (devstr, &end,10 );if (!devid) { ret = -EINVAL ; goto out_free;
Signature · 4 lines
1.8.1.2 .
Quoted 2 lines · Zhang Zhen
use the newer and more pleasant
kstrtoul()to replacesimple_strtoul(), becausesimple_strtoul()is marked for obsoletion.
[...]
fs/btrfs/ioctl.c static noinline int btrfs_ioctl_resize(struct file *file, · line 1509
Quoted 2 lines
fs/btrfs/ioctl.c +1
-1- devid =simple_strtoull (devstr, &end,10 ); + devid =kstrtoul (devstr, &end,10 );
kstrtoul appears to take its arguments in a different order:
unsigned long long simple_strtoull(const char * cp,
char ** endp, unsigned int base);
int kstrtoul(const char *s, unsigned int base, unsigned long *res);
Signature · 1 line
David Taylor
Quoted 8 lines · David Taylor
Quoted 2 lines · Zhang Zhen
use the newer and more pleasant
kstrtoul()to replacesimple_strtoul(), becausesimple_strtoul()is marked for obsoletion.[...]
fs/btrfs/ioctl.c static noinline int btrfs_ioctl_resize(struct file *file, · line 1509
Quoted 2 lines
fs/btrfs/ioctl.c +1
-1- devid =simple_strtoull (devstr, &end,10 ); + devid =kstrtoul (devstr, &end,10 );
Quoted 7 lines
kstrtoul appears to take its arguments in a different order:
unsigned long long simple_strtoull(const char * cp,
char ** endp, unsigned int base);int
kstrtoul(const char *s, unsigned int base, unsigned long *res);
Hi David,
You are right, i made a mistake.
I will soon send the right one .
Thanks for your reply.