Re: [PATCH 2/2] mmc:sdhci-bayhub:provide a solution to improve sd host card compatibility

From: kernel test robot
Date: Fri Jan 21 2022 - 17:48:12 EST


Hi Chevron,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on c9e6606c7fe92b50a02ce51dda82586ebdf99b48]

url: https://github.com/0day-ci/linux/commits/Chevron-Li/mmc-sdhci-msm-fix-Qualcomm-sd-host-7180-SD-card-compatibility-issue/20220121-191113
base: c9e6606c7fe92b50a02ce51dda82586ebdf99b48
config: arm64-randconfig-s032-20220118 (https://download.01.org/0day-ci/archive/20220122/202201220601.vDkqlC2r-lkp@xxxxxxxxx/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/0day-ci/linux/commit/8916351ffe4bd538ba3bf2c5e16a151fb47674fe
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Chevron-Li/mmc-sdhci-msm-fix-Qualcomm-sd-host-7180-SD-card-compatibility-issue/20220121-191113
git checkout 8916351ffe4bd538ba3bf2c5e16a151fb47674fe
# 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@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)
drivers/mmc/host/sdhci-msm.c: note: in included file:
>> drivers/mmc/host/sdhci-bayhub.c:1498:28: sparse: sparse: Using plain integer as NULL pointer
drivers/mmc/host/sdhci-bayhub.c:2945:40: sparse: sparse: Using plain integer as NULL pointer
drivers/mmc/host/sdhci-bayhub.c:2945:43: sparse: sparse: Using plain integer as NULL pointer
drivers/mmc/host/sdhci-bayhub.c:2945:46: sparse: sparse: Using plain integer as NULL pointer

vim +1498 drivers/mmc/host/sdhci-bayhub.c

1480
1481 static bool ggc_read_registers_ext(struct sdhci_host *host,
1482 bool *card_status, bool *read_status,
1483 struct ggc_reg_op *gg_reg_arr, u8 num)
1484 {
1485 u8 get_idx = 0;
1486 bool ret = false;
1487 struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
1488 struct sdhci_msm_host *vendor_host = sdhci_pltfm_priv(pltfm_host);
1489 struct sdhci_bht_host *ggc = sdhci_msm_priv(vendor_host);
1490
1491 if (read_status)
1492 *read_status = false;
1493 if (card_status)
1494 *card_status = false;
1495
1496 memset(ggc->cur_read_buf, 0, 512);
1497 ret = gg_emulator_read_ext(host, card_status, read_status, ggc->cur_read_buf, 512);
> 1498 if (read_status == false)
1499 goto exit;
1500
1501 for (get_idx = 0; get_idx < num; get_idx++)
1502 (gg_reg_arr + get_idx)->value =
1503 _read_status_data_read_register(ggc->cur_read_buf, (gg_reg_arr + get_idx));
1504
1505 exit:
1506 return ret;
1507 }
1508

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