From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751600AbdB0Mjv (ORCPT ); Mon, 27 Feb 2017 07:39:51 -0500 Received: from smtprelay0126.hostedemail.com ([216.40.44.126]:39121 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751372AbdB0Mis (ORCPT ); Mon, 27 Feb 2017 07:38:48 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:966:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2196:2197:2199:2200:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3354:3622:3653:3865:3866:3867:3868:3870:3871:3872:3873:3874:4250:4321:4385:5007:6117:6119:6742:7903:8531:10004:10400:10450:10455:10848:11026:11232:11473:11658:11914:12043:12296:12555:12740:12895:13161:13229:13439:13894:14180:14181:14659:14721:19904:19999:21080:21221:21433:21451:30003:30054:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: act48_11c1afe0fcd1f X-Filterd-Recvd-Size: 3865 Message-ID: <1488199120.25838.3.camel@perches.com> Subject: Re: [PATCH v3 20/20] checkpatch: warn for use of old PCI pool API From: Joe Perches To: Romain Perier , Peter Senna Tschudin Cc: Dan Williams , Doug Ledford , Sean Hefty , Hal Rosenstock , jeffrey.t.kirsher@intel.com, "David S. Miller" , stas.yakovlev@gmail.com, "James E.J. Bottomley" , "Martin K. Petersen" , Felipe Balbi , Greg Kroah-Hartman , linux-rdma@vger.kernel.org, netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Senna Tschudin Date: Mon, 27 Feb 2017 04:38:40 -0800 In-Reply-To: <7ebf56b6-4e22-05ba-2534-61cd03a2c87c@collabora.com> References: <20170226192425.13098-1-romain.perier@collabora.com> <20170226192425.13098-21-romain.perier@collabora.com> <20170227112233.GK26544@collabora.com> <7ebf56b6-4e22-05ba-2534-61cd03a2c87c@collabora.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.3-0ubuntu0.1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2017-02-27 at 13:26 +0100, Romain Perier wrote: > Hello, > > > Le 27/02/2017 à 12:22, Peter Senna Tschudin a écrit : > > On Sun, Feb 26, 2017 at 08:24:25PM +0100, Romain Perier wrote: > > > pci_pool_*() functions should be replaced by the corresponding functions > > > in the DMA pool API. This adds support to check for use of these pci > > > functions and display a warning when it is the case. > > > > > > > I guess Joe Perches did sent some comments for this one, did you address > > them? > > See the changelog of 00/20 (for v2). I have already integrated his > comments :) Not quite. You need to add blank lines before and after the new test you added. I also wonder if you've in fact converted all of the pci_pool struct and function uses why a new checkpatch test is needed at all. Also, it seems none of these patches have reached lkml. Are you sending the patch series with MIME/html parts? > > Reviewed-by: Peter Senna Tschudin > > > Signed-off-by: Romain Perier > > > --- > > > scripts/checkpatch.pl | 9 ++++++++- > > > 1 file changed, 8 insertions(+), 1 deletion(-) > > > > > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > > > index baa3c7b..f2c775c 100755 > > > --- a/scripts/checkpatch.pl > > > +++ b/scripts/checkpatch.pl > > > @@ -6064,7 +6064,14 @@ sub process { > > > WARN("USE_DEVICE_INITCALL", > > > "please use device_initcall() or more appropriate function instead of __initcall() (see include/linux/init.h)\n" . $herecurr); > > > } > > > - > > > +# check for old PCI api pci_pool_*(), use dma_pool_*() instead > > > + if ($line =~ /\bpci_pool(?:_(?:create|destroy|alloc|zalloc|free)|)\b/) { > > > + if (WARN("USE_DMA_POOL", > > > + "please use the dma pool api or more appropriate function instead of the old pci pool api\n" . $herecurr) && > > > + $fix) { > > > + while ($fixed[$fixlinenr] =~ s/\bpci_pool(_(?:create|destroy|alloc|zalloc|free)|)\b/dma_pool$1/) {} > > > + } > > > + } > > > # check for various structs that are normally const (ops, kgdb, device_tree) > > > if ($line !~ /\bconst\b/ && > > > $line =~ /\bstruct\s+($const_structs)\b/) { > > > -- > > > 2.9.3