[csky-linux:linux-5.15-rc1-d1-v4 5/7] arch/riscv/errata/thead/errata.c:94:36: error: variable has incomplete type 'struct riscv_dma_cache_sync'

From: kernel test robot
Date: Sat Sep 04 2021 - 09:35:57 EST


tree: https://github.com/c-sky/csky-linux linux-5.15-rc1-d1-v4
head: 88c6ea42e010e46e58be159efa07cda22d95a512
commit: 0142ec9445a1e45a7d91b6a202b6ad83614b432a [5/7] riscv: errata: Support T-HEAD custom dcache ops
config: riscv-randconfig-r042-20210904 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6fe2beba7d2a41964af658c8c59dd172683ef739)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/c-sky/csky-linux/commit/0142ec9445a1e45a7d91b6a202b6ad83614b432a
git remote add csky-linux https://github.com/c-sky/csky-linux
git fetch --no-tags csky-linux linux-5.15-rc1-d1-v4
git checkout 0142ec9445a1e45a7d91b6a202b6ad83614b432a
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=riscv SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

>> arch/riscv/errata/thead/errata.c:94:36: error: variable has incomplete type 'struct riscv_dma_cache_sync'
static struct riscv_dma_cache_sync c900_dma_cache_sync = {
^
arch/riscv/errata/thead/errata.c:94:15: note: forward declaration of 'struct riscv_dma_cache_sync'
static struct riscv_dma_cache_sync c900_dma_cache_sync = {
^
>> arch/riscv/errata/thead/errata.c:103:2: error: implicit declaration of function 'riscv_dma_cache_sync_set' [-Werror,-Wimplicit-function-declaration]
riscv_dma_cache_sync_set(&c900_dma_cache_sync);
^
2 errors generated.


vim +94 arch/riscv/errata/thead/errata.c

93
> 94 static struct riscv_dma_cache_sync c900_dma_cache_sync = {
95 .cache_invalidate = c900_cache_invalidate,
96 .cache_clean = c900_cache_clean,
97 .cache_flush = c900_cache_flush,
98 };
99
100 void __init thead_errata_patch_func(struct alt_entry *begin, struct alt_entry *end,
101 unsigned long archid, unsigned long impid)
102 {
> 103 riscv_dma_cache_sync_set(&c900_dma_cache_sync);

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

Attachment: .config.gz
Description: application/gzip