tree:
https://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git for-next
head: 44ab661dd29db5956b73ae7553865604f9d725fa
commit: 3507bc4811771fea6e063d5a2f1685c515002a5b [9/11] riscv: Remove the 'riscv_'
prefix of function name
config: riscv-randconfig-r026-20200601 (attached as .config)
compiler: clang version 11.0.0 (
https://github.com/llvm/llvm-project
2388a096e7865c043e83ece4e26654bd3d1a20d5)
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
git checkout 3507bc4811771fea6e063d5a2f1685c515002a5b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
> arch/riscv/kernel/patch.c:78:15: warning: no previous prototype
for function 'patch_text_nosync' [-Wmissing-prototypes]
int __kprobes
patch_text_nosync(void *addr, const void *insns, size_t len)
^
arch/riscv/kernel/patch.c:78:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
int __kprobes patch_text_nosync(void *addr, const void *insns, size_t len)
^
static
> arch/riscv/kernel/patch.c:110:15: warning: no previous prototype
for function 'patch_text' [-Wmissing-prototypes]
int __kprobes
patch_text(void *addr, u32 insn)
^
arch/riscv/kernel/patch.c:110:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
int __kprobes patch_text(void *addr, u32 insn)
^
static
2 warnings generated.
vim +/patch_text_nosync +78 arch/riscv/kernel/patch.c
77
78 int __kprobes patch_text_nosync(void *addr, const void *insns,
size_t len)
79 {
80 u32 *tp = addr;
81 int ret;
82
83 ret = patch_insn_write(tp, insns, len);
84
85 if (!ret)
86 flush_icache_range((uintptr_t) tp, (uintptr_t) tp + len);
87
88 return ret;
89 }
90
91 static int __kprobes patch_text_cb(void *data)
92 {
93 struct patch_insn *patch = data;
94 int ret = 0;
95
96 if (atomic_inc_return(&patch->cpu_count) == 1) {
97 ret =
98 patch_text_nosync(patch->addr, &patch->insn,
99 GET_INSN_LENGTH(patch->insn));
100 atomic_inc(&patch->cpu_count);
101 } else {
102 while (atomic_read(&patch->cpu_count) <= num_online_cpus())
103 cpu_relax();
104 smp_mb();
105 }
106
107 return ret;
108 }
109
110 int __kprobes patch_text(void *addr, u32 insn)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org