linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: cpufreq: use kstrtoul instead of obsolete simple_strtoul
@ 2019-04-19 10:28 Mohan Kumar
  2019-04-21  9:14 ` kbuild test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Mohan Kumar @ 2019-04-19 10:28 UTC (permalink / raw)
  To: rjw; +Cc: viresh.kumar, linux-pm, linux-kernel

Replace the obsolte simple_strtoul function with kstrtoul.

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

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


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

* Re: [PATCH] drivers: cpufreq: use kstrtoul instead of obsolete simple_strtoul
  2019-04-19 10:28 [PATCH] drivers: cpufreq: use kstrtoul instead of obsolete simple_strtoul Mohan Kumar
@ 2019-04-21  9:14 ` kbuild test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2019-04-21  9:14 UTC (permalink / raw)
  To: Mohan Kumar; +Cc: kbuild-all, rjw, viresh.kumar, linux-pm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2338 bytes --]

Hi Mohan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pm/linux-next]
[also build test ERROR on v5.1-rc5 next-20190418]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Mohan-Kumar/drivers-cpufreq-use-kstrtoul-instead-of-obsolete-simple_strtoul/20190421-044216
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: i386-randconfig-c0-04211526 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


All errors (new ones prefixed by >>):

   drivers//cpufreq/elanfreq.c: In function 'elanfreq_setup':
>> drivers//cpufreq/elanfreq.c:187:48: error: 'val' undeclared (first use in this function); did you mean 'vmap'?
     max_freq = kstrtoul(str, 0, (unsigned long *)&val);
                                                   ^~~
                                                   vmap
   drivers//cpufreq/elanfreq.c:187:48: note: each undeclared identifier is reported only once for each function it appears in

vim +187 drivers//cpufreq/elanfreq.c

   171	
   172	
   173	#ifndef MODULE
   174	/**
   175	 * elanfreq_setup - elanfreq command line parameter parsing
   176	 *
   177	 * elanfreq command line parameter.  Use:
   178	 *  elanfreq=66000
   179	 * to set the maximum CPU frequency to 66 MHz. Note that in
   180	 * case you do not give this boot parameter, the maximum
   181	 * frequency will fall back to _current_ CPU frequency which
   182	 * might be lower. If you build this as a module, use the
   183	 * max_freq module parameter instead.
   184	 */
   185	static int __init elanfreq_setup(char *str)
   186	{
 > 187		max_freq = kstrtoul(str, 0, (unsigned long *)&val);
   188		pr_warn("You're using the deprecated elanfreq command line option. Use elanfreq.max_freq instead, please!\n");
   189		return 1;
   190	}
   191	__setup("elanfreq=", elanfreq_setup);
   192	#endif
   193	
   194	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26885 bytes --]

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

end of thread, other threads:[~2019-04-21  9:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-19 10:28 [PATCH] drivers: cpufreq: use kstrtoul instead of obsolete simple_strtoul Mohan Kumar
2019-04-21  9:14 ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).