lkml.org 
[lkml]   [2017]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Staging rtlwifi efuse fix up a warning kzalloc
From
Date
On 08/26/2017 08:01 AM, Yurii Pavlenko wrote:
> Hello,
>
> I have attached a small patch to fix a warning "Prefer kcalloc over kzalloc with multiply"
> for efuse.c as part of challenge 10 of Eudyptula.
>
> Best regards,
> Yurii Pavlenko
>
>
> Signed-off-by: Yurii Pavlenko <pyldev@gmail.com>

Before you waste any more of our time, please read the material about patch
submission at Documentation/process/submitting-patches.rst in your source tree.
In its present form, this patch is not usable!

I also disagree with the checkpatch warning. To me, there is no difference
between specifying the size of the allocation as "EFUSE_MAX_WORD_UNIT,
sizeof(u16 *)" or "EFUSE_MAX_WORD_UNIT * sizeof(u16 *)". In fact, the only real
difference is that the source is ONE character larger with the kzalloc version!
Is that important? Certainly not to me! One thing that is readily apparent is
that kzalloc() zeros the allocated space. Of course, so does kcalloc(), but it
is not apparent from the name.

Most of the checkpatch warnings improve readability of the source, and do find
real or potential errors. This particular one does not, and I will NACK every
patch that tries to force code that I maintain to use kcalloc over kzalloc.

Larry

\
 
 \ /
  Last update: 2017-08-26 16:48    [W:0.046 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site