drivers/tee/optee/shm_pool.c:34:28-34: ERROR: application of sizeof to pointer
Subsystems (2)
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 856deb866d16e29bd65952e0289066f6078af773 commit: 5a769f6ff439cedc547395a6dc78faa26108f741 optee: Fix multi page dynamic shm pool alloc date: 9 months ago config: arm64-randconfig-c004-20200913 (attached as .config) compiler: aarch64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by kernel test robot <[email protected]>
coccinelle warnings: (new ones prefixed by >>)
>> drivers/tee/optee/shm_pool.c:34:28-34: ERROR: application of sizeof to pointer
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
kernel test robot
build bot[PATCH] optee: fix noderef.cocci warnings
drivers/tee/optee/shm_pool.c:34:28-34: ERROR: application of sizeof to pointer
From: kernel test robot <[email protected]>
drivers/tee/optee/shm_pool.c:34:28-34: ERROR: application of sizeof to pointer
sizeof when applied to a pointer typed expression gives the size of the pointer
Generated by: scripts/coccinelle/misc/noderef.cocci
Fixes 5a769f6ff439 ("optee: Fix multi page dynamic shm pool alloc")
CC Sumit Garg <[email protected]>
Signed-off-by kernel test robot <[email protected]>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 856deb866d16e29bd65952e0289066f6078af773 commit: 5a769f6ff439cedc547395a6dc78faa26108f741 optee: Fix multi page dynamic shm pool alloc
shm_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tee/optee/shm_pool.c +1 -1
@@ -31,7 +31,7 @@ static int pool_op_alloc(struct tee_shm_unsigned int nr_pages =1 << order, i;struct page **pages; - pages =kcalloc (nr_pages,sizeof (pages),GFP_KERNEL ); + pages =kcalloc (nr_pages,sizeof (*pages),GFP_KERNEL );if (!pages)return -ENOMEM ;