All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND] drivers: cpufreq: use kstrtoul instead of obsolete simple_strtoul issue fixed
@ 2019-04-21 15:05 mohankumar718
  2019-04-22  7:11 ` Viresh Kumar
  0 siblings, 1 reply; 2+ messages in thread
From: mohankumar718 @ 2019-04-21 15:05 UTC (permalink / raw)
  To: rjw; +Cc: viresh.kumar, linux-pm, linux-kernel, lkp, Mohan Kumar

From: Mohan Kumar <mohankumar718@gmail.com>

Replace the obsolte simple_strtoul function with kstrtoul.

Signed-off-by: Mohan Kumar <mohankumar718@gmail.com>
---
 drivers/cpufreq/elanfreq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/elanfreq.c b/drivers/cpufreq/elanfreq.c
index 03419f064752..6d861c2364e2 100644
--- a/drivers/cpufreq/elanfreq.c
+++ b/drivers/cpufreq/elanfreq.c
@@ -184,7 +184,8 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy)
  */
 static int __init elanfreq_setup(char *str)
 {
-	max_freq = simple_strtoul(str, &str, 0);
+	unsigned long int val = 0;
+	max_freq = kstrtoul(str, 0, &val);
 	pr_warn("You're using the deprecated elanfreq command line option. Use elanfreq.max_freq instead, please!\n");
 	return 1;
 }
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RESEND] drivers: cpufreq: use kstrtoul instead of obsolete simple_strtoul issue fixed
  2019-04-21 15:05 [RESEND] drivers: cpufreq: use kstrtoul instead of obsolete simple_strtoul issue fixed mohankumar718
@ 2019-04-22  7:11 ` Viresh Kumar
  0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2019-04-22  7:11 UTC (permalink / raw)
  To: mohankumar718; +Cc: rjw, linux-pm, linux-kernel, lkp

You mentioned RESEND in $subject, which is incorrect. This isn't a
simple resend but you changed the code. You should have mentioned V2
in $subject and ...

On 21-04-19, 18:05, mohankumar718@gmail.com wrote:
> From: Mohan Kumar <mohankumar718@gmail.com>
> 
> Replace the obsolte simple_strtoul function with kstrtoul.
> 
> Signed-off-by: Mohan Kumar <mohankumar718@gmail.com>
> ---

Mentioned V1->V2 diff right here in the patch.

>  drivers/cpufreq/elanfreq.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/elanfreq.c b/drivers/cpufreq/elanfreq.c
> index 03419f064752..6d861c2364e2 100644
> --- a/drivers/cpufreq/elanfreq.c
> +++ b/drivers/cpufreq/elanfreq.c
> @@ -184,7 +184,8 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy)
>   */
>  static int __init elanfreq_setup(char *str)
>  {
> -	max_freq = simple_strtoul(str, &str, 0);
> +	unsigned long int val = 0;

A blank line here would be nice.

> +	max_freq = kstrtoul(str, 0, &val);

And this looks wrong. The value isn't returned by kstrtoul but an
error message or 0.

>  	pr_warn("You're using the deprecated elanfreq command line option. Use elanfreq.max_freq instead, please!\n");
>  	return 1;
>  }
> -- 
> 2.17.1

-- 
viresh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-22  7:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-21 15:05 [RESEND] drivers: cpufreq: use kstrtoul instead of obsolete simple_strtoul issue fixed mohankumar718
2019-04-22  7:11 ` Viresh Kumar

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.