From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Senna Tschudin Subject: Re: [PATCH v3 20/20] checkpatch: warn for use of old PCI pool API Date: Mon, 27 Feb 2017 12:22:33 +0100 Message-ID: <20170227112233.GK26544@collabora.com> References: <20170226192425.13098-1-romain.perier@collabora.com> <20170226192425.13098-21-romain.perier@collabora.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20170226192425.13098-21-romain.perier-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org> Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Romain Perier Cc: Dan Williams , Doug Ledford , Sean Hefty , Hal Rosenstock , jeffrey.t.kirsher-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, "David S. Miller" , stas.yakovlev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, "James E.J. Bottomley" , "Martin K. Petersen" , Felipe Balbi , Greg Kroah-Hartman , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Peter Senna Tschudin , Joe Perches List-Id: linux-rdma@vger.kernel.org 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? 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 > -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html