Messages in this thread | | | Date | Fri, 14 Jan 2022 15:15:50 +0800 | From | kernel test robot <> | Subject | [jens-wiklander-tee:testing/tuxbuild 6/13] drivers/tee/tee_shm.c:52:17: warning: no previous prototype for 'shm_alloc_helper' |
| |
tree: http://git.linaro.org/people/jens.wiklander/linux-tee testing/tuxbuild head: 9ea0d125d4c9a4144b8641c454e97406b483722d commit: b056eac4e504db8ee3fb03b4d13f1c9f2653bee8 [6/13] tee: replace tee_shm_alloc() config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220114/202201141526.DF7opbkO-lkp@intel.com/config) compiler: arceb-elf-gcc (GCC) 11.2.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 git remote add jens-wiklander-tee http://git.linaro.org/people/jens.wiklander/linux-tee git fetch --no-tags jens-wiklander-tee testing/tuxbuild git checkout b056eac4e504db8ee3fb03b4d13f1c9f2653bee8 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash drivers/tee/
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/tee/tee_shm.c:52:17: warning: no previous prototype for 'shm_alloc_helper' [-Wmissing-prototypes] 52 | struct tee_shm *shm_alloc_helper(struct tee_context *ctx, size_t size, | ^~~~~~~~~~~~~~~~
vim +/shm_alloc_helper +52 drivers/tee/tee_shm.c
51 > 52 struct tee_shm *shm_alloc_helper(struct tee_context *ctx, size_t size, 53 size_t align, u32 flags, int id) 54 { 55 struct tee_device *teedev = ctx->teedev; 56 struct tee_shm *shm; 57 void *ret; 58 int rc; 59 60 if (!tee_device_get(teedev)) 61 return ERR_PTR(-EINVAL); 62 63 if (!teedev->pool) { 64 /* teedev has been detached from driver */ 65 ret = ERR_PTR(-EINVAL); 66 goto err_dev_put; 67 } 68 69 shm = kzalloc(sizeof(*shm), GFP_KERNEL); 70 if (!shm) { 71 ret = ERR_PTR(-ENOMEM); 72 goto err_dev_put; 73 } 74 75 refcount_set(&shm->refcount, 1); 76 shm->flags = flags; 77 shm->id = id; 78 79 /* 80 * We're assigning this as it is needed if the shm is to be 81 * registered. If this function returns OK then the caller expected 82 * to call teedev_ctx_get() or clear shm->ctx in case it's not 83 * needed any longer. 84 */ 85 shm->ctx = ctx; 86 87 rc = teedev->pool->ops->alloc(teedev->pool, shm, size, align); 88 if (rc) { 89 ret = ERR_PTR(rc); 90 goto err_kfree; 91 } 92 93 teedev_ctx_get(ctx); 94 return shm; 95 err_kfree: 96 kfree(shm); 97 err_dev_put: 98 tee_device_put(teedev); 99 return ret; 100 } 101
--- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
| |