Commit e3ce40cb authored by Shivani Bhardwaj's avatar Shivani Bhardwaj Committed by Greg Kroah-Hartman

Staging: lustre: lproc_ptlrpc: Replace simple_strtol with simple_stroul

The variable inst is a __u32 type and hence the function used should be
simple_strtoul.
Semantic patch used:

@@
typedef __u32;
__u32 e;
@@
e =
- simple_strtol
+ simple_strtoul
  (...)
Signed-off-by: default avatarShivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fea6fc64
...@@ -1251,7 +1251,7 @@ int lprocfs_wr_import(struct file *file, const char __user *buffer, ...@@ -1251,7 +1251,7 @@ int lprocfs_wr_import(struct file *file, const char __user *buffer,
*ptr = 0; *ptr = 0;
do_reconn = 0; do_reconn = 0;
ptr += strlen("::"); ptr += strlen("::");
inst = simple_strtol(ptr, &endptr, 10); inst = simple_strtoul(ptr, &endptr, 10);
if (*endptr) { if (*endptr) {
CERROR("config: wrong instance # %s\n", ptr); CERROR("config: wrong instance # %s\n", ptr);
} else if (inst != imp->imp_connect_data.ocd_instance) { } else if (inst != imp->imp_connect_data.ocd_instance) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment