Message ID | 5370A9ED.9000106@huawei.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
On Mon, 12 May 2014, Zhang Zhen wrote: >use the newer and more pleasant kstrtoul() to replace simple_strtoul(), >because simple_strtoul() is marked for obsoletion. [...] >- 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);
On 2014/5/12 19:28, David Taylor wrote: > On Mon, 12 May 2014, Zhang Zhen wrote: > >> use the newer and more pleasant kstrtoul() to replace simple_strtoul(), >> because simple_strtoul() is marked for obsoletion. > [...] >> - 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); > Hi David, You are right, i made a mistake. I will soon send the right one . Thanks for your reply. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 2ad7de9..0075b7d 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -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;
use the newer and more pleasant kstrtoul() to replace simple_strtoul(), because simple_strtoul() is marked for obsoletion. Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com> --- fs/btrfs/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)