Content-Type: multipart/mixed; boundary="===============3092013493371379592==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [PATCH] sched/debug: fix noderef.cocci warnings Date: Thu, 13 Aug 2020 01:59:58 +0800 Message-ID: <20200812175958.GA94389@b1d876c4bf9f> In-Reply-To: <20200812125300.11889-7-valentin.schneider@arm.com> List-Id: --===============3092013493371379592== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kernel test robot kernel/sched/debug.c:272:30-36: 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 CC: Valentin Schneider Signed-off-by: kernel test robot --- url: https://github.com/0day-ci/linux/commits/Valentin-Schneider/sched-I= nstrument-sched-domain-flags/20200812-205638 base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 949bcb8= 135a96a6923e676646bd29cbe69e8350f debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -269,7 +269,7 @@ static int sd_ctl_doflags(struct ctl_tab return 0; } = - tmp =3D kcalloc(data_size + 1, sizeof(tmp), GFP_KERNEL); + tmp =3D kcalloc(data_size + 1, sizeof(*tmp), GFP_KERNEL); for_each_set_bit(idx, &flags, __SD_FLAG_CNT) { char *name =3D sd_flag_debug[idx].name; =20 --===============3092013493371379592==--