Content-Type: multipart/mixed; boundary="===============8710442407906513993==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [PATCH] optee: fix noderef.cocci warnings Date: Mon, 14 Sep 2020 11:12:52 +0800 Message-ID: <20200914031252.GA89245@18a20b5b1e11> In-Reply-To: <202009141141.KfSHdnsS%lkp@intel.com> List-Id: --===============8710442407906513993== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kernel test robot drivers/tee/optee/shm_pool.c:34:28-34: ERROR: application of sizeof to poin= ter 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 Signed-off-by: kernel test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git = master head: 856deb866d16e29bd65952e0289066f6078af773 commit: 5a769f6ff439cedc547395a6dc78faa26108f741 optee: Fix multi page dyna= mic shm pool alloc shm_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/tee/optee/shm_pool.c +++ b/drivers/tee/optee/shm_pool.c @@ -31,7 +31,7 @@ static int pool_op_alloc(struct tee_shm_ unsigned int nr_pages =3D 1 << order, i; struct page **pages; = - pages =3D kcalloc(nr_pages, sizeof(pages), GFP_KERNEL); + pages =3D kcalloc(nr_pages, sizeof(*pages), GFP_KERNEL); if (!pages) return -ENOMEM; =20 --===============8710442407906513993==--