Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d8a00ef authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman
Browse files

staging/lustre: Convert cfs_trace_daemon_command to use kstrtoul



simple_strtoul is obsolete

Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3e1f3db1
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -882,12 +882,15 @@ int cfs_trace_daemon_command(char *str)
		memset(cfs_tracefile, 0, sizeof(cfs_tracefile));

	} else if (strncmp(str, "size=", 5) == 0) {
		cfs_tracefile_size = simple_strtoul(str + 5, NULL, 0);
		if (cfs_tracefile_size < 10 || cfs_tracefile_size > 20480)
		unsigned long tmp;

		rc = kstrtoul(str + 5, 10, &tmp);
		if (!rc) {
			if (tmp < 10 || tmp > 20480)
				cfs_tracefile_size = CFS_TRACEFILE_SIZE;
			else
			cfs_tracefile_size <<= 20;

				cfs_tracefile_size = tmp << 20;
		}
	} else if (strlen(str) >= sizeof(cfs_tracefile)) {
		rc = -ENAMETOOLONG;
	} else if (str[0] != '/') {