projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52721d9
)
tracing: Prefer kcalloc over kzalloc with multiply
author
Gil Fruchter
<gilf@ezchip.com>
Tue, 9 Jun 2015 07:32:34 +0000
(10:32 +0300)
committer
Steven Rostedt
<rostedt@goodmis.org>
Tue, 21 Jul 2015 02:30:42 +0000
(22:30 -0400)
Use kcalloc for allocating an array instead of kzalloc with multiply,
as that is what kcalloc is used for.
Found with checkpatch.
Link:
http://lkml.kernel.org/r/1433835155-6894-2-git-send-email-gilf@ezchip.com
Signed-off-by: Gil Fruchter <gilf@ezchip.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/trace.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/trace/trace.c
b/kernel/trace/trace.c
index abcbf7ff874364d22b62c0fdcf32cfbc8b0d6363..5d219384b4d1877d6dd537d0d73d538dcea03b2c 100644
(file)
--- a/
kernel/trace/trace.c
+++ b/
kernel/trace/trace.c
@@
-3035,7
+3035,7
@@
__tracing_open(struct inode *inode, struct file *file, bool snapshot)
if (!iter)
return ERR_PTR(-ENOMEM);
- iter->buffer_iter = k
zalloc(sizeof(*iter->buffer_iter) * num_possible_cpus(
),
+ iter->buffer_iter = k
calloc(num_possible_cpus(), sizeof(*iter->buffer_iter
),
GFP_KERNEL);
if (!iter->buffer_iter)
goto release;