[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202207161302.50mELF4P-lkp@intel.com>
Date: Sat, 16 Jul 2022 14:05:19 +0800
From: kernel test robot <lkp@...el.com>
To: Sumit Gupta <sumitg@...dia.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Viresh Kumar <viresh.kumar@...aro.org>
Subject: drivers/cpufreq/tegra194-cpufreq.c:337:32: sparse: sparse: symbol
'tegra194_cpufreq_soc' was not declared. Should it be static?
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9b59ec8d50a1f28747ceff9a4f39af5deba9540e
commit: 0839ed1fd7aca2cc67fbe19b8c6394e8a6e58453 cpufreq: tegra194: add soc data to support multiple soc
date: 3 months ago
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20220716/202207161302.50mELF4P-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0839ed1fd7aca2cc67fbe19b8c6394e8a6e58453
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 0839ed1fd7aca2cc67fbe19b8c6394e8a6e58453
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/cpufreq/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/cpufreq/tegra194-cpufreq.c:337:32: sparse: sparse: symbol 'tegra194_cpufreq_soc' was not declared. Should it be static?
vim +/tegra194_cpufreq_soc +337 drivers/cpufreq/tegra194-cpufreq.c
335
336 static unsigned int tegra194_get_speed(u32 cpu)
> 337 {
338 struct tegra194_cpufreq_data *data = cpufreq_get_driver_data();
339 struct cpufreq_frequency_table *pos;
340 u32 cpuid, clusterid;
341 unsigned int rate;
342 u64 ndiv;
343 int ret;
344
345 data->soc->ops->get_cpu_cluster_id(cpu, &cpuid, &clusterid);
346
347 /* reconstruct actual cpu freq using counters */
348 rate = tegra194_calculate_speed(cpu);
349
350 /* get last written ndiv value */
351 ret = data->soc->ops->get_cpu_ndiv(cpu, cpuid, clusterid, &ndiv);
352 if (WARN_ON_ONCE(ret))
353 return rate;
354
355 /*
356 * If the reconstructed frequency has acceptable delta from
357 * the last written value, then return freq corresponding
358 * to the last written ndiv value from freq_table. This is
359 * done to return consistent value.
360 */
361 cpufreq_for_each_valid_entry(pos, data->tables[clusterid]) {
362 if (pos->driver_data != ndiv)
363 continue;
364
365 if (abs(pos->frequency - rate) > 115200) {
366 pr_warn("cpufreq: cpu%d,cur:%u,set:%u,set ndiv:%llu\n",
367 cpu, rate, pos->frequency, ndiv);
368 } else {
369 rate = pos->frequency;
370 }
371 break;
372 }
373 return rate;
374 }
375
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists