mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "David E. Box" <david.e.box@linux.intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: drivers/platform/x86/intel/pmc/core_ssram.c:98:25: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Tue, 5 Mar 2024 05:25:11 +0800	[thread overview]
Message-ID: <202403050547.qnZtuNlN-lkp@intel.com> (raw)

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

                 reply	other threads:[~2024-03-04 21:25 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=202403050547.qnZtuNlN-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=david.e.box@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 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®