Re: [PATCH] mmc: dw_mmc: Add data CRC error injection

From: kernel test robot
Date: Wed Jun 30 2021 - 10:31:13 EST


Hi Vincent,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.13 next-20210630]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Vincent-Whitchurch/mmc-dw_mmc-Add-data-CRC-error-injection/20210630-182344
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 007b350a58754a93ca9fe50c498cc27780171153
config: arm-buildonly-randconfig-r005-20210630 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/c77ecd0f5373a88c7f00191136827f5bc42f3948
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Vincent-Whitchurch/mmc-dw_mmc-Add-data-CRC-error-injection/20210630-182344
git checkout c77ecd0f5373a88c7f00191136827f5bc42f3948
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm

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

All errors (new ones prefixed by >>):

drivers/mmc/host/dw_mmc.c: In function 'dw_mci_start_fault_timer':
>> drivers/mmc/host/dw_mmc.c:1826:21: error: implicit declaration of function 'prandom_u32' [-Werror=implicit-function-declaration]
1826 | ms_to_ktime(prandom_u32() % 25),
| ^~~~~~~~~~~
cc1: some warnings being treated as errors


vim +/prandom_u32 +1826 drivers/mmc/host/dw_mmc.c

1811
1812 static void dw_mci_start_fault_timer(struct dw_mci *host)
1813 {
1814 struct mmc_data *data = host->data;
1815
1816 if (!data || data->blocks <= 1)
1817 return;
1818
1819 if (!should_fail(&host->fail_data_crc, 1))
1820 return;
1821
1822 /*
1823 * Try to inject the error at random points during the data transfer.
1824 */
1825 hrtimer_start(&host->fault_timer,
> 1826 ms_to_ktime(prandom_u32() % 25),
1827 HRTIMER_MODE_REL);
1828 }
1829

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

Attachment: .config.gz
Description: application/gzip