From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Subject: Re: [PATCH 01/10] dm snapshot: Use kmalloc_array() in init_origin_hash() Date: Thu, 29 Sep 2016 13:56:26 -0700 Message-ID: <1475182586.1954.3.camel@perches.com> References: <566ABCD9.1060404@users.sourceforge.net> <080668d9-1e1e-e208-f9ea-ff718e8070e5@users.sourceforge.net> <3861d349-48fd-162b-a749-83e007f70b41@users.sourceforge.net> <1475142864.31297.5.camel@tiscali.nl> <1475143376.1946.2.camel@perches.com> <1475147577.31297.11.camel@tiscali.nl> <1475149503.31297.14.camel@tiscali.nl> <1475161270.2027.5.camel@perches.com> <1475178181.31297.21.camel@tiscali.nl> <1475180693.1954.1.camel@perches.com> <1475181593.31297.25.camel@tiscali.nl> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1475181593.31297.25.camel@tiscali.nl> Sender: kernel-janitors-owner@vger.kernel.org To: Paul Bolle , Andy Whitcroft Cc: SF Markus Elfring , dm-devel@redhat.com, linux-raid@vger.kernel.org, Alasdair Kergon , Mike Snitzer , Shaohua Li , LKML , kernel-janitors@vger.kernel.org, Julia Lawall List-Id: linux-raid.ids On Thu, 2016-09-29 at 22:39 +0200, Paul Bolle wrote: > On Thu, 2016-09-29 at 13:24 -0700, Joe Perches wrote: > > On Thu, 2016-09-29 at 21:43 +0200, Paul Bolle wrote: > > > Why doesn't that regex match on "ORIGIN_HASH_SIZE"? > > It does match. > If that regex does match, it being part of a negative test, the > specific checkpatch rule should be silent, shouldn't it? 'cause I forgot to trim() the original $4 and $10 matches. Oh well. It doesn't matter match either way to me. The case for the unnecessary multiply with <= gcc 4.8 was removed with: commit 91c6a05f72a996bee5133e76374ab3ad7d3b9b72 Author: Alexey Dobriyan Date: Tue Jul 26 15:22:08 2016 -0700 mm: faster kmalloc_array(), kcalloc() When both arguments to kmalloc_array() or kcalloc() are known at compile time then their product is known at compile time but search for kmalloc cache happens at runtime not at compile time. Link: http://lkml.kernel.org/r/20160627213454.GA2440@p183.telecom.by Signed-off-by: Alexey Dobriyan Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds