drivers/remoteproc/qcom_q6v5_pas.c:108:6: warning: no previous prototype for function 'adsp_segment_dump'

From: kernel test robot
Date: Wed Jun 07 2023 - 11:13:01 EST


Hi Yogesh,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a4d7d701121981e3c3fe69ade376fe9f26324161
commit: a376c10d45a8e6ee5ea55791193f90625b35e156 remoteproc: qcom: pas: Adjust the phys addr wrt the mem region
date: 4 months ago
config: arm64-buildonly-randconfig-r005-20230607 (https://download.01.org/0day-ci/archive/20230607/202306072353.uUeUzI6M-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build):
mkdir -p ~/bin
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a376c10d45a8e6ee5ea55791193f90625b35e156
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a376c10d45a8e6ee5ea55791193f90625b35e156
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=arm64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/remoteproc/

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/202306072353.uUeUzI6M-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/remoteproc/qcom_q6v5_pas.c:108:6: warning: no previous prototype for function 'adsp_segment_dump' [-Wmissing-prototypes]
108 | void adsp_segment_dump(struct rproc *rproc, struct rproc_dump_segment *segment,
| ^
drivers/remoteproc/qcom_q6v5_pas.c:108:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
108 | void adsp_segment_dump(struct rproc *rproc, struct rproc_dump_segment *segment,
| ^
| static
1 warning generated.


vim +/adsp_segment_dump +108 drivers/remoteproc/qcom_q6v5_pas.c

107
> 108 void adsp_segment_dump(struct rproc *rproc, struct rproc_dump_segment *segment,
109 void *dest, size_t offset, size_t size)
110 {
111 struct qcom_adsp *adsp = rproc->priv;
112 int total_offset;
113
114 total_offset = segment->da + segment->offset + offset - adsp->mem_phys;
115 if (total_offset < 0 || total_offset + size > adsp->mem_size) {
116 dev_err(adsp->dev,
117 "invalid copy request for segment %pad with offset %zu and size %zu)\n",
118 &segment->da, offset, size);
119 memset(dest, 0xff, size);
120 return;
121 }
122
123 memcpy_fromio(dest, adsp->mem_region + total_offset, size);
124 }
125

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