From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751193AbdBHTAS (ORCPT ); Wed, 8 Feb 2017 14:00:18 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:34324 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751613AbdBHTAN (ORCPT ); Wed, 8 Feb 2017 14:00:13 -0500 Date: Wed, 8 Feb 2017 19:55:50 +0100 From: Peter Senna Tschudin To: Romain Perier 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 Subject: Re: [RFC 19/19] checkpatch: warn for use of old PCI pool API Message-ID: <20170208185550.GS16878@collabora.com> References: <20170208163457.28853-1-romain.perier@collabora.com> <20170208163457.28853-20-romain.perier@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170208163457.28853-20-romain.perier@collabora.com> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 08, 2017 at 05:34:57PM +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. Don't know if relevant, but did not catch the struct. Other than that works fine. > > Signed-off-by: Romain Perier > --- > scripts/checkpatch.pl | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 8e96af5..026920e 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -6058,6 +6058,11 @@ 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_.+\(/) { > + WARN("USE_PCI_POOL", > + "please use the dma pool api or more appropriate function instead of the old pci pool api\n" . $herecurr); > + } > > # check for various structs that are normally const (ops, kgdb, device_tree) > if ($line !~ /\bconst\b/ && > -- > 2.9.3 >