* [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
@ 2021-07-31 6:59 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-07-31 6:59 UTC (permalink / raw)
To: Manisha Chinthapally; +Cc: kbuild-all, linux-kernel, Faycal Benmlih
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [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
@ 2021-07-31 6:59 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-07-31 6:59 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3377 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(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37755 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-31 7:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-31 6:59 [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 kernel test robot
2021-07-31 6:59 ` 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.