Re: [PATCH] Staging rtlwifi efuse fix up a warning kzalloc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux