drivers/mmc/host/wmt-sdmmc.c:241:39: sparse: sparse: incorrect type in assignment (different base types)
From: kernel test robot
Date: Thu Sep 17 2026 - 04:19:55 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9b87fdc9af2fbfcdb5c24a64139685ef80f6573f
commit: 7cd8db0fb0b2bf309163d56fec585c0f9e0964d1 mmc: add COMPILE_TEST to multiple drivers
date: 1 year ago
config: riscv-randconfig-r1309-20260917 (https://download.01.org/0day-ci/archive/20260917/202609171639.ppn4Bdj8-lkp@xxxxxxxxx/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 148ee2b266b73a49f1f31d0bd17d4818b91bee9f)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260917/202609171639.ppn4Bdj8-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: 7cd8db0fb0b2 ("mmc: add COMPILE_TEST to multiple drivers")
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609171639.ppn4Bdj8-lkp@xxxxxxxxx/
sparse warnings: (new ones prefixed by >>)
WARNING: invalid argument to '-march': '_zacas_zabha'
>> drivers/mmc/host/wmt-sdmmc.c:241:39: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/mmc/host/wmt-sdmmc.c:241:39: sparse: expected unsigned int
drivers/mmc/host/wmt-sdmmc.c:241:39: sparse: got restricted __be32 [usertype]
vim +241 drivers/mmc/host/wmt-sdmmc.c
3a96dff0f828ae Tony Prisk 2012-11-18 221
3a96dff0f828ae Tony Prisk 2012-11-18 222 static void wmt_mci_read_response(struct mmc_host *mmc)
3a96dff0f828ae Tony Prisk 2012-11-18 223 {
3a96dff0f828ae Tony Prisk 2012-11-18 224 struct wmt_mci_priv *priv;
3a96dff0f828ae Tony Prisk 2012-11-18 225 int idx1, idx2;
3a96dff0f828ae Tony Prisk 2012-11-18 226 u8 tmp_resp;
3a96dff0f828ae Tony Prisk 2012-11-18 227 u32 response;
3a96dff0f828ae Tony Prisk 2012-11-18 228
3a96dff0f828ae Tony Prisk 2012-11-18 229 priv = mmc_priv(mmc);
3a96dff0f828ae Tony Prisk 2012-11-18 230
3a96dff0f828ae Tony Prisk 2012-11-18 231 for (idx1 = 0; idx1 < 4; idx1++) {
3a96dff0f828ae Tony Prisk 2012-11-18 232 response = 0;
3a96dff0f828ae Tony Prisk 2012-11-18 233 for (idx2 = 0; idx2 < 4; idx2++) {
3a96dff0f828ae Tony Prisk 2012-11-18 234 if ((idx1 == 3) && (idx2 == 3))
3a96dff0f828ae Tony Prisk 2012-11-18 235 tmp_resp = readb(priv->sdmmc_base + SDMMC_RSP);
3a96dff0f828ae Tony Prisk 2012-11-18 236 else
3a96dff0f828ae Tony Prisk 2012-11-18 237 tmp_resp = readb(priv->sdmmc_base + SDMMC_RSP +
3a96dff0f828ae Tony Prisk 2012-11-18 238 (idx1*4) + idx2 + 1);
3a96dff0f828ae Tony Prisk 2012-11-18 239 response |= (tmp_resp << (idx2 * 8));
3a96dff0f828ae Tony Prisk 2012-11-18 240 }
3a96dff0f828ae Tony Prisk 2012-11-18 @241 priv->cmd->resp[idx1] = cpu_to_be32(response);
3a96dff0f828ae Tony Prisk 2012-11-18 242 }
3a96dff0f828ae Tony Prisk 2012-11-18 243 }
3a96dff0f828ae Tony Prisk 2012-11-18 244
:::::: The code at line 241 was first introduced by commit
:::::: 3a96dff0f828ae9dfb43efd49a9b67a74c6dc360 mmc: SD/MMC Host Controller for Wondermedia WM8505/WM8650
:::::: TO: Tony Prisk <linux@xxxxxxxxxxxxxxx>
:::::: CC: Chris Ball <cjb@xxxxxxxxxx>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki