All of lore.kernel.org
 help / color / mirror / Atom feed
* [acrn:6.17/linux 5/9] drivers/virt/acrn/hvlog.c:393:33: sparse: sparse: incorrect type in assignment (different address spaces)
@ 2026-03-11 13:02 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-03-11 13:02 UTC (permalink / raw)
  To: Fei Li; +Cc: oe-kbuild-all, Yifan Liu, Zhangwei6, Haoyu Tang

tree:   https://github.com/projectacrn/acrn-kernel 6.17/linux
head:   d2ae39d099178698dc32d2165a32f4d6d13d107b
commit: f8aee7a312dbbc04e1f182a7a43bd55dfb092292 [5/9] virt: acrn: add acrn hypervisor log back
config: x86_64-randconfig-123-20260311 (https://download.01.org/0day-ci/archive/20260311/202603112056.8hRIlEeF-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260311/202603112056.8hRIlEeF-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/202603112056.8hRIlEeF-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/virt/acrn/hvlog.c:393:33: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void *static [toplevel] hvlog_buf_virtaddr_base @@     got void [noderef] __iomem * @@
   drivers/virt/acrn/hvlog.c:393:33: sparse:     expected void *static [toplevel] hvlog_buf_virtaddr_base
   drivers/virt/acrn/hvlog.c:393:33: sparse:     got void [noderef] __iomem *

vim +393 drivers/virt/acrn/hvlog.c

   377	
   378	int acrn_hvlog_init(void)
   379	{
   380		int idx, ret = 0;
   381		uint64_t cur_logbuf, last_logbuf;
   382	
   383		if (x86_hyper_type != X86_HYPER_ACRN) {
   384			pr_err("acrn_trace: not support acrn hypervisor!\n");
   385			return -EINVAL;
   386		}
   387	
   388		if (!hvlog_buf_phyaddr_base || !hvlog_buf_size) {
   389			pr_warn("no fixed memory reserve for hvlog.\n");
   390			return 0;
   391		}
   392	
 > 393		hvlog_buf_virtaddr_base = ioremap(hvlog_buf_phyaddr_base, hvlog_buf_size);
   394		if(!hvlog_buf_virtaddr_base) {
   395			pr_info("%s: Error ioremap hvlog memblock.\n", __func__);
   396			return 0;
   397		}
   398	
   399		pcpu_nr = total_cpus;;
   400		foreach_hvlog_type(idx, SBUF_HVLOG_TYPES) {
   401			acrn_hvlog_devs[idx] = kcalloc(pcpu_nr,
   402				sizeof(struct acrn_hvlog), GFP_KERNEL);
   403			if (!acrn_hvlog_devs[idx])
   404				return -ENOMEM;
   405		}
   406	
   407		assign_hvlog_buf_base(&cur_logbuf, &last_logbuf);
   408		ret = init_hvlog_dev(cur_logbuf, SBUF_CUR_HVLOG);
   409		if (ret) {
   410			pr_err("Failed to init cur hvlog devs, errno %d\n", ret);
   411			return ret;
   412		}
   413	
   414		/* If error happens for last hvlog devs setup, just print out an warn */
   415		ret = init_hvlog_dev(last_logbuf, SBUF_LAST_HVLOG);
   416		if (ret)
   417			pr_warn("Failed to init last hvlog devs, errno %d\n", ret);
   418	
   419		pr_info("Initialized hvlog module with %u cpu\n", pcpu_nr);
   420		return 0;
   421	}
   422	

-- 
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:[~2026-03-11 13:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-11 13:02 [acrn:6.17/linux 5/9] drivers/virt/acrn/hvlog.c:393:33: sparse: sparse: incorrect type in assignment (different address spaces) kernel test robot

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.