lkml.org 
[lkml]   [2017]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 19/19] checkpatch: warn for use of old PCI pool API
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 <romain.perier@collabora.com>
> ---
> 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
>

\
 
 \ /
  Last update: 2017-02-08 20:00    [W:0.102 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site