Skip to content

Commit c3a1f2e

Browse files
ethancedwards8Mikulas Patocka
authored andcommitted
dm: change kzalloc to kcalloc
Use 2-factor multiplication argument form kcalloc() instead of instead of the deprecated kzalloc() [1]. [1] https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments Link: KSPP#162 Signed-off-by: Ethan Carter Edwards <[email protected]> Reviewed-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Mikulas Patocka <[email protected]>
1 parent 193700b commit c3a1f2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/md/dm-ps-io-affinity.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static int ioa_create(struct path_selector *ps, unsigned int argc, char **argv)
116116
if (!s)
117117
return -ENOMEM;
118118

119-
s->path_map = kzalloc(nr_cpu_ids * sizeof(struct path_info *),
119+
s->path_map = kcalloc(nr_cpu_ids, sizeof(struct path_info *),
120120
GFP_KERNEL);
121121
if (!s->path_map)
122122
goto free_selector;

0 commit comments

Comments
 (0)