lkml.org 
[lkml]   [2020]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] sched/debug: fix noderef.cocci warnings
From: kernel test robot <lkp@intel.com>

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 <valentin.schneider@arm.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

url: https://github.com/0day-ci/linux/commits/Valentin-Schneider/sched-Instrument-sched-domain-flags/20200812-205638
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 949bcb8135a96a6923e676646bd29cbe69e8350f

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 = kcalloc(data_size + 1, sizeof(tmp), GFP_KERNEL);
+ tmp = kcalloc(data_size + 1, sizeof(*tmp), GFP_KERNEL);
for_each_set_bit(idx, &flags, __SD_FLAG_CNT) {
char *name = sd_flag_debug[idx].name;

\
 
 \ /
  Last update: 2020-08-12 20:01    [W:0.086 / U:1.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site