Re: [PATCH 4/6] remoteproc: mtk_vpu_rproc: Don't try to load empty PT_LOAD segment

From: kernel test robot
Date: Mon Jul 13 2020 - 18:23:31 EST


Hi Alexandre,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v5.8-rc5 next-20200713]
[cannot apply to remoteproc/for-next rpmsg/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Alexandre-Bailon/Add-support-of-mt8183-APU/20200713-213336
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm-allyesconfig (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
# 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 warnings (new ones prefixed by >>):

>> drivers/remoteproc/mtk_apu_rproc.c:140:5: warning: no previous prototype for 'mtk_vpu_elf_sanity_check' [-Wmissing-prototypes]
140 | int mtk_vpu_elf_sanity_check(struct rproc *rproc, const struct firmware *fw)
| ^~~~~~~~~~~~~~~~~~~~~~~~

vim +/mtk_vpu_elf_sanity_check +140 drivers/remoteproc/mtk_apu_rproc.c

139
> 140 int mtk_vpu_elf_sanity_check(struct rproc *rproc, const struct firmware *fw)
141 {
142 const u8 *elf_data = fw->data;
143 struct elf32_hdr *ehdr;
144 struct elf32_phdr *phdr;
145 int ret;
146 int i;
147
148 ret = rproc_elf_sanity_check(rproc, fw);
149 if (ret)
150 return ret;
151
152 ehdr = (struct elf32_hdr *)elf_data;
153 phdr = (struct elf32_phdr *)(elf_data + ehdr->e_phoff);
154
155 for (i = 0; i < ehdr->e_phnum; i++, phdr++) {
156 /* Remove empty PT_LOAD section */
157 if (phdr->p_type == PT_LOAD && !phdr->p_paddr)
158 phdr->p_type = PT_NULL;
159 }
160
161 return 0;
162 }
163

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

Attachment: .config.gz
Description: application/gzip