2023-12-11 09:04:16

by Li, Philip

[permalink] [raw]
Subject: drivers/cpufreq/cpufreq.c:475:17: sparse: sparse: incorrect type in assignment (different address spaces)

Hi Lad,

First bad commit (maybe != root cause):

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3b47bc037bd44f142ac09848e8d3ecccc726be99
commit: effae0e3d9e1139d583e9b5d050f4f948825b8a3 riscv: Kconfig: Enable cpufreq kconfig menu
date: 1 year ago
:::::: branch date: 26 hours ago
:::::: commit date: 1 year ago
config: riscv-randconfig-r031-20230608 (https://download.01.org/0day-ci/archive/20231201/[email protected]/config)
compiler: riscv64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20231201/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

sparse warnings: (new ones prefixed by >>)
WARNING: invalid argument to '-march': '_zicbom_zihintpause'
>> drivers/cpufreq/cpufreq.c:475:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct notifier_block *nb @@ got struct notifier_block [noderef] __rcu *static [addressable] [toplevel] head @@
drivers/cpufreq/cpufreq.c:475:17: sparse: expected struct notifier_block *nb
drivers/cpufreq/cpufreq.c:475:17: sparse: got struct notifier_block [noderef] __rcu *static [addressable] [toplevel] head
>> drivers/cpufreq/cpufreq.c:475:65: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct notifier_block *nb @@ got struct notifier_block [noderef] __rcu *next @@
drivers/cpufreq/cpufreq.c:475:65: sparse: expected struct notifier_block *nb
drivers/cpufreq/cpufreq.c:475:65: sparse: got struct notifier_block [noderef] __rcu *next

vim +475 drivers/cpufreq/cpufreq.c

b7898fda5bc7e7 Rafael J. Wysocki 2016-03-30 466
b7898fda5bc7e7 Rafael J. Wysocki 2016-03-30 467 static void cpufreq_list_transition_notifiers(void)
b7898fda5bc7e7 Rafael J. Wysocki 2016-03-30 468 {
b7898fda5bc7e7 Rafael J. Wysocki 2016-03-30 469 struct notifier_block *nb;
b7898fda5bc7e7 Rafael J. Wysocki 2016-03-30 470
b7898fda5bc7e7 Rafael J. Wysocki 2016-03-30 471 pr_info("Registered transition notifiers:\n");
b7898fda5bc7e7 Rafael J. Wysocki 2016-03-30 472
b7898fda5bc7e7 Rafael J. Wysocki 2016-03-30 473 mutex_lock(&cpufreq_transition_notifier_list.mutex);
b7898fda5bc7e7 Rafael J. Wysocki 2016-03-30 474
b7898fda5bc7e7 Rafael J. Wysocki 2016-03-30 @475 for (nb = cpufreq_transition_notifier_list.head; nb; nb = nb->next)
d75f773c86a2b8 Sakari Ailus 2019-03-25 476 pr_info("%pS\n", nb->notifier_call);
b7898fda5bc7e7 Rafael J. Wysocki 2016-03-30 477
b7898fda5bc7e7 Rafael J. Wysocki 2016-03-30 478 mutex_unlock(&cpufreq_transition_notifier_list.mutex);
b7898fda5bc7e7 Rafael J. Wysocki 2016-03-30 479 }
b7898fda5bc7e7 Rafael J. Wysocki 2016-03-30 480

:::::: The code at line 475 was first introduced by commit
:::::: b7898fda5bc7e786e76ce24fbd2ec993b08ec518 cpufreq: Support for fast frequency switching

:::::: TO: Rafael J. Wysocki <[email protected]>
:::::: CC: Rafael J. Wysocki <[email protected]>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki