All of lore.kernel.org
 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,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Subject: [pdx86-platform-drivers-x86:review-hans 28/36] drivers/platform/x86/intel/pmc/core_ssram.c:98:25: sparse: sparse: incorrect type in argument 1 (different address spaces)
Date: Tue, 5 Dec 2023 19:15:10 +0800	[thread overview]
Message-ID: <202312051949.S6RGbdp3-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git review-hans
head:   35ddd61cf023b5deb2b7e9f1627abef053281c0a
commit: a01486dc4bb17de976c6d0a4b1ad5f8106525dfb [28/36] platform/x86/intel/pmc: Cleanup SSRAM discovery
config: x86_64-randconfig-r113-20231205 (https://download.01.org/0day-ci/archive/20231205/202312051949.S6RGbdp3-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231205/202312051949.S6RGbdp3-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/202312051949.S6RGbdp3-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:[~2023-12-05 11:15 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=202312051949.S6RGbdp3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=david.e.box@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --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 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.