[mchinth: sep_socwatch_linux_5_9 32/41] drivers/platform/x86/sepdk/sep/chap.c:78:39: sparse: sparse: cast removes address space '__iomem' of expression

From: kernel test robot
Date: Wed Aug 04 2021 - 03:35:25 EST


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: x86_64-randconfig-s022-20210803 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-348-gf0e6938b-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=x86_64 SHELL=/bin/bash drivers/platform/x86/sepdk/pax/ drivers/platform/x86/sepdk/sep/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)
>> drivers/platform/x86/sepdk/sep/chap.c:78:39: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/sepdk/sep/chap.c:90:39: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/sepdk/sep/chap.c:103:39: sparse: sparse: cast removes address space '__iomem' of expression

vim +/__iomem +78 drivers/platform/x86/sepdk/sep/chap.c

44
45 /* ------------------------------------------------------------------------- */
46 /*!
47 * @fn static U32 chap_Init_Chipset(void)
48 *
49 * @brief Chipset PMU initialization
50 *
51 * @param None
52 *
53 * @return VT_SUCCESS if successful, otherwise error
54 *
55 * <I>Special Notes:</I>
56 * <NONE>
57 */
58 static U32 chap_Init_Chipset(void)
59 {
60 U32 i;
61 CHIPSET_SEGMENT mch_chipset_seg = &CHIPSET_CONFIG_mch(pma);
62 CHIPSET_SEGMENT ich_chipset_seg = &CHIPSET_CONFIG_ich(pma);
63 CHIPSET_SEGMENT noa_chipset_seg = &CHIPSET_CONFIG_noa(pma);
64
65 SEP_DRV_LOG_TRACE_IN("");
66
67 SEP_DRV_LOG_TRACE("Initializing chipset ...");
68
69 if (DRV_CONFIG_enable_chipset(drv_cfg)) {
70 for (i = 0; i < GLOBAL_STATE_num_cpus(driver_state); i++) {
71 pcb[i].chipset_count_init = TRUE;
72 }
73 if ((CHIPSET_CONFIG_mch_chipset(pma)) &&
74 (CHIPSET_SEGMENT_virtual_address(mch_chipset_seg) == 0)) {
75 // Map virtual address of PCI CHAP interface
76 CHIPSET_SEGMENT_virtual_address(
77 mch_chipset_seg) =
> 78 (U64)(UIOP)ioremap_cache(
79 CHIPSET_SEGMENT_physical_address(
80 mch_chipset_seg),
81 CHIPSET_SEGMENT_size(
82 mch_chipset_seg));
83 }
84
85 if ((CHIPSET_CONFIG_ich_chipset(pma)) &&
86 (CHIPSET_SEGMENT_virtual_address(ich_chipset_seg) == 0)) {
87 // Map the virtual address of PCI CHAP interface
88 CHIPSET_SEGMENT_virtual_address(
89 ich_chipset_seg) =
90 (U64)(UIOP)ioremap_cache(
91 CHIPSET_SEGMENT_physical_address(
92 ich_chipset_seg),
93 CHIPSET_SEGMENT_size(
94 ich_chipset_seg));
95 }
96
97 // Here we map the MMIO registers for the Gen X processors.
98 if ((CHIPSET_CONFIG_noa_chipset(pma)) &&
99 (CHIPSET_SEGMENT_virtual_address(noa_chipset_seg) == 0)) {
100 // Map the virtual address of PCI CHAP interface
101 CHIPSET_SEGMENT_virtual_address(
102 noa_chipset_seg) =
103 (U64)(UIOP)ioremap_cache(
104 CHIPSET_SEGMENT_physical_address(
105 noa_chipset_seg),
106 CHIPSET_SEGMENT_size(
107 noa_chipset_seg));
108 }
109
110 //
111 // always collect processor events
112 //
113 CHIPSET_CONFIG_processor(pma) = 1;
114 } else {
115 CHIPSET_CONFIG_processor(pma) = 0;
116 }
117 SEP_DRV_LOG_TRACE("Initializing chipset done.");
118
119 SEP_DRV_LOG_TRACE_OUT("");
120 return VT_SUCCESS;
121 }
122

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip