From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============6610034036622157432==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [PATCH] drm/amd/display/dc/calcs/dce_calcs: fix noderef.cocci warnings Date: Sun, 21 Mar 2021 04:39:02 +0800 Message-ID: <20210320203902.GA16190@d2f0d42e889c> In-Reply-To: <20210319082428.3294591-8-lee.jones@linaro.org> List-Id: --===============6610034036622157432== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kernel test robot drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:2054:17-23: ERROR: applica= tion of sizeof to pointer drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:2058:17-23: ERROR: applica= tion 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 CC: Lee Jones Reported-by: kernel test robot Signed-off-by: kernel test robot --- url: https://github.com/0day-ci/linux/commits/Lee-Jones/Rid-GPU-from-W-1= -warnings/20210319-162705 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git = 8b12a62a4e3ed4ae99c715034f557eb391d6b196 dce_calcs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c +++ b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c @@ -2051,11 +2051,11 @@ void bw_calcs_init(struct bw_calcs_dceip = enum bw_calcs_version version =3D bw_calcs_version_from_asic_id(asic_id); = - dceip =3D kzalloc(sizeof(dceip), GFP_KERNEL); + dceip =3D kzalloc(sizeof(*dceip), GFP_KERNEL); if (!dceip) return; = - vbios =3D kzalloc(sizeof(vbios), GFP_KERNEL); + vbios =3D kzalloc(sizeof(*vbios), GFP_KERNEL); if (!vbios) { kfree(dceip); return; --===============6610034036622157432==--