From patchwork Thu Sep 29 21:21:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 9357109 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D93C960757 for ; Thu, 29 Sep 2016 21:23:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C56DB29C50 for ; Thu, 29 Sep 2016 21:23:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B877829C54; Thu, 29 Sep 2016 21:23:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8CA9A29C50 for ; Thu, 29 Sep 2016 21:23:36 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8TLLUSZ042749; Thu, 29 Sep 2016 17:21:30 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u8TLLTwV030140 for ; Thu, 29 Sep 2016 17:21:29 -0400 Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8TLLSjX030662 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 29 Sep 2016 17:21:29 -0400 Received: from smtprelay.hostedemail.com (smtprelay0147.hostedemail.com [216.40.44.147]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9B7DC335F8C; Thu, 29 Sep 2016 21:21:27 +0000 (UTC) Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id 7FD299EA13; Thu, 29 Sep 2016 21:21:26 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: corn70_c4423ddd2a1d X-Filterd-Recvd-Size: 3151 Received: from XPS-9350 (174.sub-70-197-90.myvzw.com [70.197.90.174]) (Authenticated sender: joe@perches.com) by omf01.hostedemail.com (Postfix) with ESMTPA; Thu, 29 Sep 2016 21:21:24 +0000 (UTC) Message-ID: <1475184082.1954.5.camel@perches.com> From: Joe Perches To: Paul Bolle , Andy Whitcroft Date: Thu, 29 Sep 2016 14:21:22 -0700 In-Reply-To: <1475183693.31297.36.camel@tiscali.nl> 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> <1475182586.1954.3.camel@perches.com> <1475183693.31297.36.camel@tiscali.nl> Mime-Version: 1.0 X-Greylist: Sender IP whitelisted by DNSRBL, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 29 Sep 2016 21:21:27 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 29 Sep 2016 21:21:27 +0000 (UTC) for IP:'216.40.44.147' DOMAIN:'smtprelay0147.hostedemail.com' HELO:'smtprelay.hostedemail.com' FROM:'joe@perches.com' RCPT:'' X-RedHat-Spam-Score: 0.69 (BAYES_50, DCC_REPUT_13_19, RCVD_IN_DNSWL_NONE) 216.40.44.147 smtprelay0147.hostedemail.com 216.40.44.147 smtprelay0147.hostedemail.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-loop: dm-devel@redhat.com Cc: Mike Snitzer , kernel-janitors@vger.kernel.org, LKML , Julia@redhat.com, linux-raid@vger.kernel.org, Lawall , dm-devel@redhat.com, Shaohua Li , SF Markus Elfring , Alasdair Kergon Subject: Re: [dm-devel] [PATCH 01/10] dm snapshot: Use kmalloc_array() in init_origin_hash() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Virus-Scanned: ClamAV using ClamSMTP On Thu, 2016-09-29 at 23:14 +0200, Paul Bolle wrote: > On Thu, 2016-09-29 at 13:56 -0700, Joe Perches wrote: > > It doesn't matter match either way to me. > Why does this stop you fixing an apparently wrong checkpatch rule, > crude as parts of it are (ie, uppercase identifier must be a constant)? It doesn't. It just doesn't matter much (match) to me. Here: --- scripts/checkpatch.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3373c65fef1c..fc931d89152e 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -5835,8 +5835,8 @@ sub process { if ($^V && $^V ge 5.10.0 && $line =~ /\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*(k[mz]alloc)\s*\(\s*($FuncArg)\s*\*\s*($FuncArg)\s*,/) { my $oldfunc = $3; - my $a1 = $4; - my $a2 = $10; + my $a1 = trim($4); + my $a2 = trim($10); my $newfunc = "kmalloc_array"; $newfunc = "kcalloc" if ($oldfunc eq "kzalloc"); my $r1 = $a1; @@ -5850,7 +5850,7 @@ sub process { if (WARN("ALLOC_WITH_MULTIPLY", "Prefer $newfunc over $oldfunc with multiply\n" . $herecurr) && $fix) { - $fixed[$fixlinenr] =~ s/\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*(k[mz]alloc)\s*\(\s*($FuncArg)\s*\*\s*($FuncArg)/$1 . ' = ' . "$newfunc(" . trim($r1) . ', ' . trim($r2)/e; + $fixed[$fixlinenr] =~ s/\b($Lval)\s*\=\s*(?:$balanced_parens)?\s*(k[mz]alloc)\s*\(\s*($FuncArg)\s*\*\s*($FuncArg)/$1 . ' = ' . "$newfunc(" . $r1 . ', ' . $r2/e; } }