Re: [PATCH v7 2/2] EDAC: Add EDAC driver for loongson memory controller

From: kernel test robot
Date: Mon Nov 11 2024 - 07:01:32 EST


Hi Zhao,

kernel test robot noticed the following build errors:

[auto build test ERROR on e14232afa94445e03fc3a0291b07a68f3408c120]

url: https://github.com/intel-lab-lkp/linux/commits/Zhao-Qunqin/dt-bindings-EDAC-for-ls3a5000-memory-controller/20241111-141155
base: e14232afa94445e03fc3a0291b07a68f3408c120
patch link: https://lore.kernel.org/r/20241111060939.5349-3-zhaoqunqin%40loongson.cn
patch subject: [PATCH v7 2/2] EDAC: Add EDAC driver for loongson memory controller
config: i386-allmodconfig (https://download.01.org/0day-ci/archive/20241111/202411111918.lhNjQmXB-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241111/202411111918.lhNjQmXB-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
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411111918.lhNjQmXB-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

drivers/edac/loongson_edac.c: In function 'read_ecc':
>> drivers/edac/loongson_edac.c:28:15: error: implicit declaration of function 'readq'; did you mean 'readl'? [-Werror=implicit-function-declaration]
28 | ecc = readq(pvt->ecc_base + ECC_CS_COUNT_REG);
| ^~~~~
| readl
cc1: some warnings being treated as errors

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for GET_FREE_REGION
Depends on [n]: SPARSEMEM [=n]
Selected by [m]:
- RESOURCE_KUNIT_TEST [=m] && RUNTIME_TESTING_MENU [=y] && KUNIT [=m]


vim +28 drivers/edac/loongson_edac.c

18
19 static int read_ecc(struct mem_ctl_info *mci)
20 {
21 struct loongson_edac_pvt *pvt = mci->pvt_info;
22 u64 ecc;
23 int cs;
24
25 if (!pvt->ecc_base)
26 return pvt->last_ce_count;
27
> 28 ecc = readq(pvt->ecc_base + ECC_CS_COUNT_REG);
29 /* cs0 -- cs3 */
30 cs = ecc & 0xff;
31 cs += (ecc >> 8) & 0xff;
32 cs += (ecc >> 16) & 0xff;
33 cs += (ecc >> 24) & 0xff;
34
35 return cs;
36 }
37

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki