From: kernel test robot <lkp@intel.com>
To: Manisha Chinthapally <manisha.chinthapally@intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Faycal Benmlih <faycal.benmlih@intel.com>
Subject: [mchinth: sep_socwatch_linux_5_9 32/41] drivers/platform/x86/sepdk/sep/pci.c:365:17: sparse: sparse: cast removes address space '__iomem' of expression
Date: Sat, 31 Jul 2021 14:59:47 +0800 [thread overview]
Message-ID: <202107311441.ev1u83qm-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3292 bytes --]
tree: https://github.com/mchinth/linux sep_socwatch_linux_5_9
head: 7296486889985b9d9895a39f551764a4b0425bea
commit: 4a8adda8065c4c6944ffedd3025605c845c262a5 [32/41] SEP/SOCWATCH resolve build errors after rebasing to linux v5.6-rc3
config: i386-randconfig-s032-20210730 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://github.com/mchinth/linux/commit/4a8adda8065c4c6944ffedd3025605c845c262a5
git remote add mchinth https://github.com/mchinth/linux
git fetch --no-tags mchinth sep_socwatch_linux_5_9
git checkout 4a8adda8065c4c6944ffedd3025605c845c262a5
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/platform/x86/sepdk/sep/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/platform/x86/sepdk/sep/pci.c:365:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/sepdk/sep/pci.c:417:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/sepdk/sep/pci.c:462:16: sparse: sparse: cast removes address space '__iomem' of expression
vim +/__iomem +365 drivers/platform/x86/sepdk/sep/pci.c
334
335 /* ------------------------------------------------------------------------- */
336 /*!
337 * @fn extern int PCI_Read_From_Memory_Address(addr, val)
338 *
339 * @param addr - physical address in mmio
340 * @param *value - value at this address
341 *
342 * @return status
343 *
344 * @brief Read memory mapped i/o physical location
345 *
346 */
347 int PCI_Read_From_Memory_Address(U32 addr, U32 *val)
348 {
349 U32 aligned_addr, offset, value;
350 PVOID base;
351
352 SEP_DRV_LOG_TRACE_IN("Addr: %x, val_pointer: %p.", addr, val);
353
354 if (addr <= 0) {
355 SEP_DRV_LOG_ERROR_TRACE_OUT("OS_INVALID (addr <= 0!).");
356 return OS_INVALID;
357 }
358
359 SEP_DRV_LOG_TRACE("Preparing to reading physical address: %x.", addr);
360 offset = addr & ~PAGE_MASK;
361 aligned_addr = addr & PAGE_MASK;
362 SEP_DRV_LOG_TRACE("Aligned physical address: %x, offset: %x.",
363 aligned_addr, offset);
364
> 365 base = (PVOID)ioremap_cache(aligned_addr, PAGE_SIZE);
366 if (base == NULL) {
367 SEP_DRV_LOG_ERROR_TRACE_OUT("OS_INVALID (mapping failed!).");
368 return OS_INVALID;
369 }
370
371 SEP_DRV_LOG_REGISTER_IN("Will read PCI address %u (mapped at %p).",
372 addr, base + offset);
373 value = readl((void __iomem *)(base + offset));
374 SEP_DRV_LOG_REGISTER_OUT("Read PCI address %u (mapped at %p): %x.",
375 addr, base + offset, value);
376
377 *val = value;
378
379 iounmap((void __iomem *)base);
380
381 SEP_DRV_LOG_TRACE_OUT("OS_SUCCESS.");
382 return OS_SUCCESS;
383 }
384
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37755 bytes --]
reply other threads:[~2021-07-31 7:00 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=202107311441.ev1u83qm-lkp@intel.com \
--to=lkp@intel.com \
--cc=faycal.benmlih@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manisha.chinthapally@intel.com \
/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