Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751172AbdHZP0j (ORCPT ); Sat, 26 Aug 2017 11:26:39 -0400 Received: from smtprelay0100.hostedemail.com ([216.40.44.100]:57420 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751062AbdHZP0i (ORCPT ); Sat, 26 Aug 2017 11:26:38 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:541:599:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1538:1568:1593:1594:1711:1714:1730:1747:1777:1792:2393:2559:2562:2693:2828:2897:3138:3139:3140:3141:3142:3622:3865:3866:3867:3871:3872:3874:4250:4321:5007:7903:10004:10400:10848:11232:11658:11914:12740:12760:12895:13069:13161:13163:13229:13311:13357:13439:14659:21080:21627:30012:30034:30051:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: shade49_1c944fe22fe24 X-Filterd-Recvd-Size: 1358 Message-ID: <1503761195.12569.43.camel@perches.com> Subject: Re: [PATCH] Staging rtlwifi efuse fix up a warning kzalloc From: Joe Perches To: Larry Finger , Yurii Pavlenko Cc: gregkh@linuxfoundation.org, pkshih@realtek.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Date: Sat, 26 Aug 2017 08:26:35 -0700 In-Reply-To: <2ba8d35d-44e8-0509-469b-5564efe64e76@lwfinger.net> References: <1503752478-9732-1-git-send-email-pyldev@gmail.com> <2ba8d35d-44e8-0509-469b-5564efe64e76@lwfinger.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 441 Lines: 14 On Sat, 2017-08-26 at 09:48 -0500, Larry Finger wrote: > I will NACK every > patch that tries to force code that I maintain to use kcalloc over kzalloc. Your choice. The concept behind the kzalloc with multiply vs kcalloc is protection against multiplication overflow. It's unlikely to solve any real problem with a sizeof(foo) * small known number of entries. It does have application when number of entries is a user specified value.