linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [chanwoo:devfreq-testing 5/5] drivers/devfreq/hisi_uncore_freq.c:552:16: sparse: sparse: incorrect type in return expression (different modifiers)
@ 2025-05-09 14:02 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-05-09 14:02 UTC (permalink / raw)
  To: Jie Zhan; +Cc: oe-kbuild-all, linux-pm, Chanwoo Choi, Lifeng Zheng

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux.git devfreq-testing
head:   a0983893e344a836747449e1d20f5273761d39fa
commit: a0983893e344a836747449e1d20f5273761d39fa [5/5] PM / devfreq: Add HiSilicon uncore frequency scaling driver
config: nios2-randconfig-r131-20250509 (https://download.01.org/0day-ci/archive/20250509/202505092135.WsWbEZNU-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 7.5.0
reproduce: (https://download.01.org/0day-ci/archive/20250509/202505092135.WsWbEZNU-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505092135.WsWbEZNU-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/devfreq/hisi_uncore_freq.c:552:16: sparse: sparse: incorrect type in return expression (different modifiers) @@     expected struct cpumask * @@     got struct cpumask const * @@
   drivers/devfreq/hisi_uncore_freq.c:552:16: sparse:     expected struct cpumask *
   drivers/devfreq/hisi_uncore_freq.c:552:16: sparse:     got struct cpumask const *
   drivers/devfreq/hisi_uncore_freq.c:562:16: sparse: sparse: incorrect type in return expression (different modifiers) @@     expected struct cpumask * @@     got struct cpumask const * @@
   drivers/devfreq/hisi_uncore_freq.c:562:16: sparse:     expected struct cpumask *
   drivers/devfreq/hisi_uncore_freq.c:562:16: sparse:     got struct cpumask const *
>> drivers/devfreq/hisi_uncore_freq.c:590:1: sparse: sparse: symbol 'dev_attr_related_cpus' was not declared. Should it be static?

vim +552 drivers/devfreq/hisi_uncore_freq.c

   549	
   550	static struct cpumask *get_package_cpumask(int cpu)
   551	{
 > 552		return topology_core_cpumask(cpu);
   553	}
   554	
   555	static int get_cluster_id(int cpu)
   556	{
   557		return topology_cluster_id(cpu);
   558	}
   559	
   560	static struct cpumask *get_cluster_cpumask(int cpu)
   561	{
   562		return topology_cluster_cpumask(cpu);
   563	}
   564	
   565	static int hisi_uncore_mark_related_cpus_wrap(struct hisi_uncore_freq *uncore)
   566	{
   567		int rc;
   568	
   569		cpumask_clear(&uncore->related_cpus);
   570	
   571		rc = hisi_uncore_mark_related_cpus(uncore, "related-package",
   572						   get_package_id,
   573						   get_package_cpumask);
   574		if (rc == 0)
   575			return rc;
   576	
   577		return hisi_uncore_mark_related_cpus(uncore, "related-cluster",
   578						     get_cluster_id,
   579						     get_cluster_cpumask);
   580	}
   581	
   582	static ssize_t related_cpus_show(struct device *dev,
   583					 struct device_attribute *attr, char *buf)
   584	{
   585		struct hisi_uncore_freq *uncore = dev_get_drvdata(dev->parent);
   586	
   587		return cpumap_print_to_pagebuf(true, buf, &uncore->related_cpus);
   588	}
   589	
 > 590	DEVICE_ATTR_RO(related_cpus);
   591	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-05-09 14:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-09 14:02 [chanwoo:devfreq-testing 5/5] drivers/devfreq/hisi_uncore_freq.c:552:16: sparse: sparse: incorrect type in return expression (different modifiers) kernel 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).