mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* drivers/platform/x86/intel/pmc/core_ssram.c:98:25: sparse: sparse: incorrect type in argument 1 (different address spaces)
@ 2024-03-04 21:25 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-03-04 21:25 UTC (permalink / raw)
  To: David E. Box
  Cc: oe-kbuild-all, linux-kernel, Hans de Goede, Ilpo Järvinen

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   90d35da658da8cff0d4ecbb5113f5fac9d00eb72
commit: a01486dc4bb17de976c6d0a4b1ad5f8106525dfb platform/x86/intel/pmc: Cleanup SSRAM discovery
date:   3 months ago
config: x86_64-randconfig-r111-20240304 (https://download.01.org/0day-ci/archive/20240305/202403050547.qnZtuNlN-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240305/202403050547.qnZtuNlN-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/202403050547.qnZtuNlN-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/platform/x86/intel/pmc/core_ssram.c:98:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile *val @@     got void [noderef] __iomem *__val @@
   drivers/platform/x86/intel/pmc/core_ssram.c:98:25: sparse:     expected void const volatile *val
   drivers/platform/x86/intel/pmc/core_ssram.c:98:25: sparse:     got void [noderef] __iomem *__val

vim +98 drivers/platform/x86/intel/pmc/core_ssram.c

    70	
    71	static int
    72	pmc_core_ssram_get_pmc(struct pmc_dev *pmcdev, int pmc_idx, u32 offset)
    73	{
    74		struct pci_dev *ssram_pcidev = pmcdev->ssram_pcidev;
    75		void __iomem __free(pmc_core_iounmap) *tmp_ssram = NULL;
    76		void __iomem __free(pmc_core_iounmap) *ssram = NULL;
    77		const struct pmc_reg_map *map;
    78		u64 ssram_base, pwrm_base;
    79		u16 devid;
    80	
    81		if (!pmcdev->regmap_list)
    82			return -ENOENT;
    83	
    84		ssram_base = ssram_pcidev->resource[0].start;
    85		tmp_ssram = ioremap(ssram_base, SSRAM_HDR_SIZE);
    86	
    87		if (pmc_idx != PMC_IDX_MAIN) {
    88			/*
    89			 * The secondary PMC BARS (which are behind hidden PCI devices)
    90			 * are read from fixed offsets in MMIO of the primary PMC BAR.
    91			 */
    92			ssram_base = get_base(tmp_ssram, offset);
    93			ssram = ioremap(ssram_base, SSRAM_HDR_SIZE);
    94			if (!ssram)
    95				return -ENOMEM;
    96	
    97		} else {
  > 98			ssram = no_free_ptr(tmp_ssram);
    99		}
   100	
   101		pwrm_base = get_base(ssram, SSRAM_PWRM_OFFSET);
   102		devid = readw(ssram + SSRAM_DEVID_OFFSET);
   103	
   104		map = pmc_core_find_regmap(pmcdev->regmap_list, devid);
   105		if (!map)
   106			return -ENODEV;
   107	
   108		return pmc_core_pmc_add(pmcdev, pwrm_base, map, PMC_IDX_MAIN);
   109	}
   110	

-- 
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:[~2024-03-04 21:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-04 21:25 drivers/platform/x86/intel/pmc/core_ssram.c:98:25: sparse: sparse: incorrect type in argument 1 (different address spaces) 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

all inboxes | Powered by JetHome®