[OPW,kernel,v2,7/7] Staging: lustre: Replace obsolete simple_strtoul with kstrtoul
diff mbox

Message ID e5918c5706762f98ead08554111f78afe155d7a4.1382784520.git.rashika.kheria@gmail.com
State Accepted
Headers show

Commit Message

Rashika Oct. 26, 2013, 10:55 a.m. UTC
This patch fixes the following checkpatch.pl warning in lustre/ldlm/ldlm_resource.c-
WARNING: simple_strtoul is obsolete, use kstrtoul instead

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Waskiewicz Jr, Peter P Oct. 26, 2013, 8:24 p.m. UTC | #1
On Sat, 2013-10-26 at 16:25 +0530, Rashika Kheria wrote:
> This patch fixes the following checkpatch.pl warning in lustre/ldlm/ldlm_resource.c-
> WARNING: simple_strtoul is obsolete, use kstrtoul instead
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>

Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>

> ---
>  drivers/staging/lustre/lustre/ldlm/ldlm_resource.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
> index 8d3dd6d..f058f89 100644
> --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
> +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
> @@ -228,7 +228,7 @@ static ssize_t lprocfs_lru_size_seq_write(struct file *file, const char *buffer,
>  		return count;
>  	}
>  
> -	tmp = simple_strtoul(dummy, &end, 0);
> +	tmp = kstrtoul(dummy, &end, 0);
>  	if (dummy == end) {
>  		CERROR("invalid value written\n");
>  		return -EINVAL;
> -- 
> 1.7.9.5
>
Greg KH Oct. 27, 2013, 3:45 a.m. UTC | #2
On Sat, Oct 26, 2013 at 04:25:27PM +0530, Rashika Kheria wrote:
> This patch fixes the following checkpatch.pl warning in lustre/ldlm/ldlm_resource.c-
> WARNING: simple_strtoul is obsolete, use kstrtoul instead
> 
> Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> ---
>  drivers/staging/lustre/lustre/ldlm/ldlm_resource.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
> index 8d3dd6d..f058f89 100644
> --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
> +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
> @@ -228,7 +228,7 @@ static ssize_t lprocfs_lru_size_seq_write(struct file *file, const char *buffer,
>  		return count;
>  	}
>  
> -	tmp = simple_strtoul(dummy, &end, 0);
> +	tmp = kstrtoul(dummy, &end, 0);

You didn't test this patch by building it, as it now causes a huge
warning to be created by the compiler, so I can't take it, sorry.

Please fix that up and resend.

thanks,

greg k-j

Patch
diff mbox

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
index 8d3dd6d..f058f89 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
@@ -228,7 +228,7 @@  static ssize_t lprocfs_lru_size_seq_write(struct file *file, const char *buffer,
 		return count;
 	}
 
-	tmp = simple_strtoul(dummy, &end, 0);
+	tmp = kstrtoul(dummy, &end, 0);
 	if (dummy == end) {
 		CERROR("invalid value written\n");
 		return -EINVAL;