Messages in this thread | | | Date | Mon, 28 Mar 2022 00:15:21 +0800 | From | kernel test robot <> | Subject | [asahilinux:pr/22 96/189] drivers/platform/apple/smc_core.c:202:26: sparse: sparse: cast to restricted __be32 |
| |
tree: https://github.com/AsahiLinux/linux pr/22 head: 7ee315306d1a3b0da8cf2a53e7f55889d0e7f034 commit: 322906b25cbf56148e4b57a6368f6d715e48b022 [96/189] platform/apple: Add new Apple Mac SMC driver config: arm64-randconfig-s032-20220327 (https://download.01.org/0day-ci/archive/20220328/202203280041.0z3zY6Vd-lkp@intel.com/config) compiler: aarch64-linux-gcc (GCC) 11.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-dirty # https://github.com/AsahiLinux/linux/commit/322906b25cbf56148e4b57a6368f6d715e48b022 git remote add asahilinux https://github.com/AsahiLinux/linux git fetch --no-tags asahilinux pr/22 git checkout 322906b25cbf56148e4b57a6368f6d715e48b022 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash
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/apple/smc_core.c:202:26: sparse: sparse: cast to restricted __be32
vim +202 drivers/platform/apple/smc_core.c
182 183 struct apple_smc *apple_smc_probe(struct device *dev, const struct apple_smc_backend_ops *ops, void *cookie) 184 { 185 struct apple_smc *smc; 186 u32 count; 187 int ret; 188 189 smc = devm_kzalloc(dev, sizeof(*smc), GFP_KERNEL); 190 if (!smc) 191 return ERR_PTR(-ENOMEM); 192 193 smc->dev = dev; 194 smc->be_cookie = cookie; 195 smc->be = ops; 196 mutex_init(&smc->mutex); 197 RAW_INIT_NOTIFIER_HEAD(&smc->event_handlers); 198 199 ret = apple_smc_read_u32(smc, SMC_KEY(#KEY), &count); 200 if (ret) 201 return ERR_PTR(dev_err_probe(dev, ret, "Failed to get key count")); > 202 smc->key_count = be32_to_cpu(count); 203 204 ret = apple_smc_get_key_by_index(smc, 0, &smc->first_key); 205 if (ret) 206 return ERR_PTR(dev_err_probe(dev, ret, "Failed to get first key")); 207 208 ret = apple_smc_get_key_by_index(smc, smc->key_count - 1, &smc->last_key); 209 if (ret) 210 return ERR_PTR(dev_err_probe(dev, ret, "Failed to get last key")); 211 212 /* Enable notifications */ 213 apple_smc_write_flag(smc, SMC_KEY(NTAP), 1); 214 215 dev_info(dev, "Initialized (%d keys %p4ch..%p4ch)\n", 216 smc->key_count, &smc->first_key, &smc->last_key); 217 218 dev_set_drvdata(dev, smc); 219 220 ret = mfd_add_devices(dev, -1, apple_smc_devs, ARRAY_SIZE(apple_smc_devs), NULL, 0, NULL); 221 if (ret) 222 return ERR_PTR(dev_err_probe(dev, ret, "Subdevice initialization failed")); 223 224 return smc; 225 } 226 EXPORT_SYMBOL(apple_smc_probe); 227
-- 0-DAY CI Kernel Test Service https://01.org/lkp
| |