Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1157387 > unrolled thread

RE: [PATCH 1/2] tracing: Prefer kcalloc over kzalloc with multiply

Started byGil Fruchter <gilf@ezchip.com>
First post2015-06-03 14:00 +0200
Last post2015-06-03 14:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  RE: [PATCH 1/2] tracing: Prefer kcalloc over kzalloc with multiply Gil Fruchter <gilf@ezchip.com> - 2015-06-03 14:00 +0200

#1157387 — RE: [PATCH 1/2] tracing: Prefer kcalloc over kzalloc with multiply

FromGil Fruchter <gilf@ezchip.com>
Date2015-06-03 14:00 +0200
SubjectRE: [PATCH 1/2] tracing: Prefer kcalloc over kzalloc with multiply
Message-ID<pxfuW-8s4-3@gated-at.bofh.it>
On Tue, Jun 2, 2015 at 5:15 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> On Tue, 2 Jun 2015 16:26:28 +0300
> Gil Fruchter <gilf@ezchip.com> wrote:
> 
>> fix checkpatch warning for using kzalloc with multiply:
>> WARNING: Prefer kcalloc over kzalloc with multiply
>> + iter->buffer_iter = kzalloc(sizeof(*iter->buffer_iter)
>> 						* num_possible_cpus(),
> 
> I'm not against applying this patch, but "fix checkpatch warning" is never rational for a change.
> 
> This should say something like, "Use kcalloc for allocating an array instead of a simple multiplier with kzalloc, as that is what kcalloc is used for."
> 
> In other words, if checkpatch found something that should be change, have the change log tell us why it should be changed. You can than add a "Found with checkpatch" to give checkpatch the credit.
> 
> -- Steve
> 

Thanks for the input Steve.
I will create a v2 with an appropriate explanation for this change.

Can I add a Reviewed-by tag by you?

Gil 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web