* [PATCH v2] Staging: lustre: lproc_ptlrpc: Replace simple_strtol with simple_stroul
@ 2015-10-15 20:47 Shivani Bhardwaj
0 siblings, 0 replies; only message in thread
From: Shivani Bhardwaj @ 2015-10-15 20:47 UTC (permalink / raw)
To: outreachy-kernel
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: Shivani Bhardwaj <shivanib134@gmail.com>
---
Changes in v2:
-Make semantic patch correct.
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
index ec44b3c..415817c 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
@@ -1251,7 +1251,7 @@ int lprocfs_wr_import(struct file *file, const char __user *buffer,
*ptr = 0;
do_reconn = 0;
ptr += strlen("::");
- inst = simple_strtol(ptr, &endptr, 10);
+ inst = simple_strtoul(ptr, &endptr, 10);
if (*endptr) {
CERROR("config: wrong instance # %s\n", ptr);
} else if (inst != imp->imp_connect_data.ocd_instance) {
--
2.1.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-15 20:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-15 20:47 [PATCH v2] Staging: lustre: lproc_ptlrpc: Replace simple_strtol with simple_stroul Shivani Bhardwaj
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.