From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751387AbdB0M1F (ORCPT ); Mon, 27 Feb 2017 07:27:05 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:36624 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751046AbdB0M1D (ORCPT ); Mon, 27 Feb 2017 07:27:03 -0500 Subject: Re: [PATCH v3 20/20] checkpatch: warn for use of old PCI pool API To: Peter Senna Tschudin References: <20170226192425.13098-1-romain.perier@collabora.com> <20170226192425.13098-21-romain.perier@collabora.com> <20170227112233.GK26544@collabora.com> 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 , Joe Perches From: Romain Perier Message-ID: <7ebf56b6-4e22-05ba-2534-61cd03a2c87c@collabora.com> Date: Mon, 27 Feb 2017 13:26:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170227112233.GK26544@collabora.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 :) > > 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 >>