Re: [PATCH] drivers: cpufreq: use kstrtoul instead of obsolete simple_strtoul

From: kbuild test robot
Date: Sun Apr 21 2019 - 05:15:27 EST


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@xxxxxxxxx>


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: .config.gz
Description: application/gzip