Messages in this thread | | | Date | Wed, 21 Jul 2021 09:33:16 +0800 | From | kernel test robot <> | Subject | [stblinux:drivers/fixes 1/1] drivers/firmware/broadcom/tee_bnxt_fw.c:215:16: error: implicit declaration of function 'tee_shm_alloc_kernel_buf' |
| |
tree: https://github.com/Broadcom/stblinux drivers/fixes head: 4ecd797b7e16eb7f1b86fbfd7e4a7887b192535b commit: 4ecd797b7e16eb7f1b86fbfd7e4a7887b192535b [1/1] firmware: tee_bnxt: Release TEE shm, session, and context during kexec config: x86_64-randconfig-a016-20210720 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 87039c048c0cbc3d8cbba86187269b006bf2f373) 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 x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # https://github.com/Broadcom/stblinux/commit/4ecd797b7e16eb7f1b86fbfd7e4a7887b192535b git remote add stblinux https://github.com/Broadcom/stblinux git fetch --no-tags stblinux drivers/fixes git checkout 4ecd797b7e16eb7f1b86fbfd7e4a7887b192535b # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/firmware/broadcom/tee_bnxt_fw.c:215:16: error: implicit declaration of function 'tee_shm_alloc_kernel_buf' [-Werror,-Wimplicit-function-declaration] fw_shm_pool = tee_shm_alloc_kernel_buf(pvt_data.ctx, MAX_SHM_MEM_SZ); ^ >> drivers/firmware/broadcom/tee_bnxt_fw.c:215:14: warning: incompatible integer to pointer conversion assigning to 'struct tee_shm *' from 'int' [-Wint-conversion] fw_shm_pool = tee_shm_alloc_kernel_buf(pvt_data.ctx, MAX_SHM_MEM_SZ); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning and 1 error generated.
vim +/tee_shm_alloc_kernel_buf +215 drivers/firmware/broadcom/tee_bnxt_fw.c
183 184 static int tee_bnxt_fw_probe(struct device *dev) 185 { 186 struct tee_client_device *bnxt_device = to_tee_client_device(dev); 187 int ret, err = -ENODEV; 188 struct tee_ioctl_open_session_arg sess_arg; 189 struct tee_shm *fw_shm_pool; 190 191 memset(&sess_arg, 0, sizeof(sess_arg)); 192 193 /* Open context with TEE driver */ 194 pvt_data.ctx = tee_client_open_context(NULL, optee_ctx_match, NULL, 195 NULL); 196 if (IS_ERR(pvt_data.ctx)) 197 return -ENODEV; 198 199 /* Open session with Bnxt load Trusted App */ 200 memcpy(sess_arg.uuid, bnxt_device->id.uuid.b, TEE_IOCTL_UUID_LEN); 201 sess_arg.clnt_login = TEE_IOCTL_LOGIN_PUBLIC; 202 sess_arg.num_params = 0; 203 204 ret = tee_client_open_session(pvt_data.ctx, &sess_arg, NULL); 205 if (ret < 0 || sess_arg.ret != 0) { 206 dev_err(dev, "tee_client_open_session failed, err: %x\n", 207 sess_arg.ret); 208 err = -EINVAL; 209 goto out_ctx; 210 } 211 pvt_data.session_id = sess_arg.session; 212 213 pvt_data.dev = dev; 214 > 215 fw_shm_pool = tee_shm_alloc_kernel_buf(pvt_data.ctx, MAX_SHM_MEM_SZ); 216 if (IS_ERR(fw_shm_pool)) { 217 dev_err(pvt_data.dev, "tee_shm_alloc_kernel_buf failed\n"); 218 err = PTR_ERR(fw_shm_pool); 219 goto out_sess; 220 } 221 222 pvt_data.fw_shm_pool = fw_shm_pool; 223 224 return 0; 225 226 out_sess: 227 tee_client_close_session(pvt_data.ctx, pvt_data.session_id); 228 out_ctx: 229 tee_client_close_context(pvt_data.ctx); 230 231 return err; 232 } 233
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [unhandled content-type:application/gzip] | |