Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1588608 > unrolled thread
| Started by | Peter Senna Tschudin <peter.senna@collabora.com> |
|---|---|
| First post | 2017-02-27 12:30 +0100 |
| Last post | 2017-02-27 17:00 +0100 |
| Articles | 6 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v3 20/20] checkpatch: warn for use of old PCI pool API Peter Senna Tschudin <peter.senna@collabora.com> - 2017-02-27 12:30 +0100
Re: [PATCH v3 20/20] checkpatch: warn for use of old PCI pool API Joe Perches <joe@perches.com> - 2017-02-27 13:00 +0100
Re: [PATCH v3 20/20] checkpatch: warn for use of old PCI pool API Romain Perier <romain.perier@collabora.com> - 2017-02-27 13:30 +0100
Re: [PATCH v3 20/20] checkpatch: warn for use of old PCI pool API Joe Perches <joe@perches.com> - 2017-02-27 13:50 +0100
Re: [PATCH v3 20/20] checkpatch: warn for use of old PCI pool API Romain Perier <romain.perier@collabora.com> - 2017-02-27 14:00 +0100
Re: [PATCH v3 20/20] checkpatch: warn for use of old PCI pool API Joe Perches <joe@perches.com> - 2017-02-27 17:00 +0100
| From | Peter Senna Tschudin <peter.senna@collabora.com> |
|---|---|
| Date | 2017-02-27 12:30 +0100 |
| Subject | Re: [PATCH v3 20/20] checkpatch: warn for use of old PCI pool API |
| Message-ID | <tfrF7-4Ql-3@gated-at.bofh.it> |
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 <peter.senna@collabora.com>
> Signed-off-by: Romain Perier <romain.perier@collabora.com>
> ---
> 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
>
[toc] | [next] | [standalone]
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2017-02-27 13:00 +0100 |
| Message-ID | <tfs89-52w-11@gated-at.bofh.it> |
| In reply to | #1588608 |
On Mon, 2017-02-27 at 12:22 +0100, Peter Senna Tschudin wrote:
> 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 <peter.senna@collabora.com>
> > Signed-off-by: Romain Perier <romain.perier@collabora.com>
> > ---
> > 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/) {
> >
This is nearly identical to the suggestion that I
sent but this is slightly misformatted as it does
not have a leading nor a trailing blank line to
separate the test blocks.
Also, I think none of the patches have reached lkml.
Romain, are you using git-send-email to send these
patches? Perhaps the patches you send also contain
html which are rejected by the mailing list.
[toc] | [prev] | [next] | [standalone]
| From | Romain Perier <romain.perier@collabora.com> |
|---|---|
| Date | 2017-02-27 13:30 +0100 |
| Message-ID | <tfsBb-5up-1@gated-at.bofh.it> |
| In reply to | #1588608 |
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 <peter.senna@collabora.com>
>> Signed-off-by: Romain Perier <romain.perier@collabora.com>
>> ---
>> 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
>>
[toc] | [prev] | [next] | [standalone]
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2017-02-27 13:50 +0100 |
| Message-ID | <tfsUz-5CV-23@gated-at.bofh.it> |
| In reply to | #1588641 |
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 <peter.senna@collabora.com>
> > > Signed-off-by: Romain Perier <romain.perier@collabora.com>
> > > ---
> > > 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
[toc] | [prev] | [next] | [standalone]
| From | Romain Perier <romain.perier@collabora.com> |
|---|---|
| Date | 2017-02-27 14:00 +0100 |
| Message-ID | <tft4e-5G3-5@gated-at.bofh.it> |
| In reply to | #1588653 |
Hello,
Le 27/02/2017 à 13:38, Joe Perches a écrit :
> 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.
Ok
>
> 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.
That's just to avoid futures mistakes/uses.
>
> Also, it seems none of these patches have reached lkml.
> Are you sending the patch series with MIME/html parts?
Normally no. I use git send-email for all my patches.
Regards,
Romain
>
>>> Reviewed-by: Peter Senna Tschudin <peter.senna@collabora.com>
>>>> Signed-off-by: Romain Perier <romain.perier@collabora.com>
>>>> ---
>>>> 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
[toc] | [prev] | [next] | [standalone]
| From | Joe Perches <joe@perches.com> |
|---|---|
| Date | 2017-02-27 17:00 +0100 |
| Message-ID | <tfvSq-7FO-21@gated-at.bofh.it> |
| In reply to | #1588656 |
On Mon, 2017-02-27 at 13:52 +0100, Romain Perier wrote: > > 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. > > That's just to avoid futures mistakes/uses. When all instances and macro definitions are removed the check is pointless as any newly submitted patch will not compile.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web