From: kernel test robot <lkp@intel.com>
To: Sumit Gupta <sumitg@nvidia.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Viresh Kumar <viresh.kumar@linaro.org>
Subject: drivers/cpufreq/tegra194-cpufreq.c:337:32: sparse: sparse: symbol 'tegra194_cpufreq_soc' was not declared. Should it be static?
Date: Sat, 16 Jul 2022 14:05:19 +0800 [thread overview]
Message-ID: <202207161302.50mELF4P-lkp@intel.com> (raw)
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@intel.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
reply other threads:[~2022-07-16 6:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202207161302.50mELF4P-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sumitg@nvidia.com \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.