* [mchinth: sep_socwatch_linux_5_9 32/41] drivers/platform/x86/socperf/pci.c:93:17: sparse: sparse: cast removes address space '__iomem' of expression
@ 2021-06-03 4:10 kernel test robot
2021-06-03 4:10 ` [RFC PATCH mchinth] read_telem() can be static kernel test robot
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2021-06-03 4:10 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 9097 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-s001-20210603 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.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__' W=1 ARCH=i386
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/socperf/pci.c:93:17: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/socperf/pci.c:139:17: sparse: sparse: cast removes address space '__iomem' of expression
--
>> drivers/platform/x86/socwatch/sw_trace_notifier_provider.c:1634:67: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int flags @@ got restricted gfp_t @@
drivers/platform/x86/socwatch/sw_trace_notifier_provider.c:1634:67: sparse: expected unsigned int flags
drivers/platform/x86/socwatch/sw_trace_notifier_provider.c:1634:67: sparse: got restricted gfp_t
--
>> drivers/platform/x86/socwatch/sw_telem.c:239:33: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/socwatch/sw_telem.c:242:28: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/socwatch/sw_telem.c:245:58: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/platform/x86/socwatch/sw_telem.c:260:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned long long volatile [usertype] *static [assigned] [toplevel] s_punitInterfaceAddr @@
drivers/platform/x86/socwatch/sw_telem.c:260:25: sparse: expected void volatile [noderef] __iomem *addr
drivers/platform/x86/socwatch/sw_telem.c:260:25: sparse: got unsigned long long volatile [usertype] *static [assigned] [toplevel] s_punitInterfaceAddr
drivers/platform/x86/socwatch/sw_telem.c:264:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned long long volatile [usertype] *static [assigned] [toplevel] s_punitDataAddr @@
drivers/platform/x86/socwatch/sw_telem.c:264:25: sparse: expected void volatile [noderef] __iomem *addr
drivers/platform/x86/socwatch/sw_telem.c:264:25: sparse: got unsigned long long volatile [usertype] *static [assigned] [toplevel] s_punitDataAddr
>> drivers/platform/x86/socwatch/sw_telem.c:268:54: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned long long volatile [usertype] *ssram_virt_addr @@
drivers/platform/x86/socwatch/sw_telem.c:268:54: sparse: expected void volatile [noderef] __iomem *addr
drivers/platform/x86/socwatch/sw_telem.c:268:54: sparse: got unsigned long long volatile [usertype] *ssram_virt_addr
drivers/platform/x86/socwatch/sw_telem.c:280:28: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/socwatch/sw_telem.c:283:28: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/socwatch/sw_telem.c:286:29: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/socwatch/sw_telem.c:289:29: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/socwatch/sw_telem.c:292:56: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/socwatch/sw_telem.c:307:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned long long volatile [usertype] *static [assigned] [toplevel] s_pmcIPCCmdAddr @@
drivers/platform/x86/socwatch/sw_telem.c:307:25: sparse: expected void volatile [noderef] __iomem *addr
drivers/platform/x86/socwatch/sw_telem.c:307:25: sparse: got unsigned long long volatile [usertype] *static [assigned] [toplevel] s_pmcIPCCmdAddr
drivers/platform/x86/socwatch/sw_telem.c:311:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned long long volatile [usertype] *static [assigned] [toplevel] s_pmcIPCStsAddr @@
drivers/platform/x86/socwatch/sw_telem.c:311:25: sparse: expected void volatile [noderef] __iomem *addr
drivers/platform/x86/socwatch/sw_telem.c:311:25: sparse: got unsigned long long volatile [usertype] *static [assigned] [toplevel] s_pmcIPCStsAddr
drivers/platform/x86/socwatch/sw_telem.c:315:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned long long volatile [usertype] *static [assigned] [toplevel] s_pmcIPCWBufAddr @@
drivers/platform/x86/socwatch/sw_telem.c:315:25: sparse: expected void volatile [noderef] __iomem *addr
drivers/platform/x86/socwatch/sw_telem.c:315:25: sparse: got unsigned long long volatile [usertype] *static [assigned] [toplevel] s_pmcIPCWBufAddr
drivers/platform/x86/socwatch/sw_telem.c:319:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned long long volatile [usertype] *static [assigned] [toplevel] s_pmcIPCRBufAddr @@
drivers/platform/x86/socwatch/sw_telem.c:319:25: sparse: expected void volatile [noderef] __iomem *addr
drivers/platform/x86/socwatch/sw_telem.c:319:25: sparse: got unsigned long long volatile [usertype] *static [assigned] [toplevel] s_pmcIPCRBufAddr
drivers/platform/x86/socwatch/sw_telem.c:323:52: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got unsigned long long volatile [usertype] *ssram_virt_addr @@
drivers/platform/x86/socwatch/sw_telem.c:323:52: sparse: expected void volatile [noderef] __iomem *addr
drivers/platform/x86/socwatch/sw_telem.c:323:52: sparse: got unsigned long long volatile [usertype] *ssram_virt_addr
>> drivers/platform/x86/socwatch/sw_telem.c:671:5: sparse: sparse: symbol 'read_telem' was not declared. Should it be static?
--
>> 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
Please review and possibly fold the followup patch.
vim +/__iomem +93 drivers/platform/x86/socperf/pci.c
62
63 /* ------------------------------------------------------------------------- */
64 /*!
65 * @fn extern int SOCPERF_PCI_Read_From_Memory_Address(addr, val)
66 *
67 * @param addr - physical address in mmio
68 * @param *value - value at this address
69 *
70 * @return status
71 *
72 * @brief Read memory mapped i/o physical location
73 *
74 */
75 int SOCPERF_PCI_Read_From_Memory_Address(U32 addr, U32 *val)
76 {
77 U32 aligned_addr, offset, value;
78 PVOID base;
79
80 if (addr <= 0) {
81 return OS_INVALID;
82 }
83
84 SOCPERF_PRINT_DEBUG(
85 "SOCPERF_PCI_Read_From_Memory_Address: reading physical address:%x\n",
86 addr);
87 offset = addr & ~PAGE_MASK;
88 aligned_addr = addr & PAGE_MASK;
89 SOCPERF_PRINT_DEBUG(
90 "SOCPERF_PCI_Read_From_Memory_Address: aligned physical address:%x,offset:%x\n",
91 aligned_addr, offset);
92
> 93 base = (PVOID)ioremap_cache(aligned_addr, PAGE_SIZE);
94 if (base == NULL) {
95 return OS_INVALID;
96 }
97
98 value = readl((void __iomem *)(base + offset));
99 *val = value;
100 SOCPERF_PRINT_DEBUG(
101 "SOCPERF_PCI_Read_From_Memory_Address: value at this physical address:%x\n",
102 value);
103
104 iounmap((void __iomem *)base);
105
106 return OS_SUCCESS;
107 }
108
---
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: 49280 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* [RFC PATCH mchinth] read_telem() can be static
2021-06-03 4:10 [mchinth: sep_socwatch_linux_5_9 32/41] drivers/platform/x86/socperf/pci.c:93:17: sparse: sparse: cast removes address space '__iomem' of expression kernel test robot
@ 2021-06-03 4:10 ` kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-06-03 4:10 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 855 bytes --]
drivers/platform/x86/socwatch/sw_telem.c:671:5: warning: symbol 'read_telem' was not declared. Should it be static?
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
sw_telem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/socwatch/sw_telem.c b/drivers/platform/x86/socwatch/sw_telem.c
index 129530b17ae99..702b18e33c86a 100644
--- a/drivers/platform/x86/socwatch/sw_telem.c
+++ b/drivers/platform/x86/socwatch/sw_telem.c
@@ -668,7 +668,7 @@ static void stop_telem(void)
pw_pr_debug("OK, bypass telem stopped\n");
}
-int read_telem(u64 *dst, enum telemetry_unit unit, bool should_retry)
+static int read_telem(u64 *dst, enum telemetry_unit unit, bool should_retry)
{
size_t num_iters = should_retry ? 10 : 0;
u64 timestamp = 0;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-03 4:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03 4:10 [mchinth: sep_socwatch_linux_5_9 32/41] drivers/platform/x86/socperf/pci.c:93:17: sparse: sparse: cast removes address space '__iomem' of expression kernel test robot
2021-06-03 4:10 ` [RFC PATCH mchinth] read_telem() can be static 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.