2019-09-28 09:43:45

by Yue Haibing

[permalink] [raw]
Subject: [RFC PATCH] scripts: Fix coccicheck failed

Run make coccicheck, I got this:

spatch -D patch --no-show-diff --very-quiet --cocci-file
./scripts/coccinelle/misc/add_namespace.cocci --dir .
-I ./arch/x86/include -I ./arch/x86/include/generated
-I ./include -I ./arch/x86/include/uapi
-I ./arch/x86/include/generated/uapi -I ./include/uapi
-I ./include/generated/uapi --include ./include/linux/kconfig.h
--jobs 192 --chunksize 1

virtual rule patch not supported
coccicheck failed

It seems add_namespace.cocci cannot be called in coccicheck.

Fixes: eb8305aecb95 ("scripts: Coccinelle script for namespace dependencies.")
Signed-off-by: YueHaibing <[email protected]>
---
scripts/{coccinelle/misc => }/add_namespace.cocci | 0
scripts/nsdeps | 2 +-
2 files changed, 1 insertion(+), 1 deletion(-)
rename scripts/{coccinelle/misc => }/add_namespace.cocci (100%)

diff --git a/scripts/coccinelle/misc/add_namespace.cocci b/scripts/add_namespace.cocci
similarity index 100%
rename from scripts/coccinelle/misc/add_namespace.cocci
rename to scripts/add_namespace.cocci
diff --git a/scripts/nsdeps b/scripts/nsdeps
index ac2b6031dd13..0f743b76e501 100644
--- a/scripts/nsdeps
+++ b/scripts/nsdeps
@@ -23,7 +23,7 @@ fi

generate_deps_for_ns() {
$SPATCH --very-quiet --in-place --sp-file \
- $srctree/scripts/coccinelle/misc/add_namespace.cocci -D ns=$1 $2
+ $srctree/scripts/add_namespace.cocci -D ns=$1 $2
}

generate_deps() {
--
2.20.1



2019-09-28 12:46:12

by Julia Lawall

[permalink] [raw]
Subject: Re: [RFC PATCH] scripts: Fix coccicheck failed



On Sat, 28 Sep 2019, YueHaibing wrote:

> Run make coccicheck, I got this:
>
> spatch -D patch --no-show-diff --very-quiet --cocci-file
> ./scripts/coccinelle/misc/add_namespace.cocci --dir .
> -I ./arch/x86/include -I ./arch/x86/include/generated
> -I ./include -I ./arch/x86/include/uapi
> -I ./arch/x86/include/generated/uapi -I ./include/uapi
> -I ./include/generated/uapi --include ./include/linux/kconfig.h
> --jobs 192 --chunksize 1
>
> virtual rule patch not supported
> coccicheck failed
>
> It seems add_namespace.cocci cannot be called in coccicheck.

Could you explain the issue better? Does the current state cause make
coccicheck to fail? Or is it just silently not being called?

thanks,
julia

>
> Fixes: eb8305aecb95 ("scripts: Coccinelle script for namespace dependencies.")
> Signed-off-by: YueHaibing <[email protected]>
> ---
> scripts/{coccinelle/misc => }/add_namespace.cocci | 0
> scripts/nsdeps | 2 +-
> 2 files changed, 1 insertion(+), 1 deletion(-)
> rename scripts/{coccinelle/misc => }/add_namespace.cocci (100%)
>
> diff --git a/scripts/coccinelle/misc/add_namespace.cocci b/scripts/add_namespace.cocci
> similarity index 100%
> rename from scripts/coccinelle/misc/add_namespace.cocci
> rename to scripts/add_namespace.cocci
> diff --git a/scripts/nsdeps b/scripts/nsdeps
> index ac2b6031dd13..0f743b76e501 100644
> --- a/scripts/nsdeps
> +++ b/scripts/nsdeps
> @@ -23,7 +23,7 @@ fi
>
> generate_deps_for_ns() {
> $SPATCH --very-quiet --in-place --sp-file \
> - $srctree/scripts/coccinelle/misc/add_namespace.cocci -D ns=$1 $2
> + $srctree/scripts/add_namespace.cocci -D ns=$1 $2
> }
>
> generate_deps() {
> --
> 2.20.1
>
>
>

2019-09-29 02:06:35

by Yue Haibing

[permalink] [raw]
Subject: Re: [RFC PATCH] scripts: Fix coccicheck failed

On 2019/9/28 20:43, Julia Lawall wrote:
>
>
> On Sat, 28 Sep 2019, YueHaibing wrote:
>
>> Run make coccicheck, I got this:
>>
>> spatch -D patch --no-show-diff --very-quiet --cocci-file
>> ./scripts/coccinelle/misc/add_namespace.cocci --dir .
>> -I ./arch/x86/include -I ./arch/x86/include/generated
>> -I ./include -I ./arch/x86/include/uapi
>> -I ./arch/x86/include/generated/uapi -I ./include/uapi
>> -I ./include/generated/uapi --include ./include/linux/kconfig.h
>> --jobs 192 --chunksize 1
>>
>> virtual rule patch not supported
>> coccicheck failed
>>
>> It seems add_namespace.cocci cannot be called in coccicheck.
>
> Could you explain the issue better? Does the current state cause make
> coccicheck to fail? Or is it just silently not being called?

Yes, it cause make coccicheck failed like this:

...
./drivers/xen/xenbus/xenbus_comms.c:290:2-8: preceding lock on line 243
./fs/fuse/dev.c:1227:2-8: preceding lock on line 1206
./fs/fuse/dev.c:1232:3-9: preceding lock on line 1206
coccicheck failed
make[1]: *** [coccicheck] Error 255
make: *** [sub-make] Error 2


>
> thanks,
> julia
>
>>
>> Fixes: eb8305aecb95 ("scripts: Coccinelle script for namespace dependencies.")
>> Signed-off-by: YueHaibing <[email protected]>
>> ---
>> scripts/{coccinelle/misc => }/add_namespace.cocci | 0
>> scripts/nsdeps | 2 +-
>> 2 files changed, 1 insertion(+), 1 deletion(-)
>> rename scripts/{coccinelle/misc => }/add_namespace.cocci (100%)
>>
>> diff --git a/scripts/coccinelle/misc/add_namespace.cocci b/scripts/add_namespace.cocci
>> similarity index 100%
>> rename from scripts/coccinelle/misc/add_namespace.cocci
>> rename to scripts/add_namespace.cocci
>> diff --git a/scripts/nsdeps b/scripts/nsdeps
>> index ac2b6031dd13..0f743b76e501 100644
>> --- a/scripts/nsdeps
>> +++ b/scripts/nsdeps
>> @@ -23,7 +23,7 @@ fi
>>
>> generate_deps_for_ns() {
>> $SPATCH --very-quiet --in-place --sp-file \
>> - $srctree/scripts/coccinelle/misc/add_namespace.cocci -D ns=$1 $2
>> + $srctree/scripts/add_namespace.cocci -D ns=$1 $2
>> }
>>
>> generate_deps() {
>> --
>> 2.20.1
>>
>>
>>
>
> .
>

2019-09-29 08:22:17

by Markus Elfring

[permalink] [raw]
Subject: Re: [Cocci] [RFC PATCH] scripts: Fix coccicheck failed

> It seems add_namespace.cocci cannot be called in coccicheck.

Probably, because this SmPL script was designed in the way that no corresponding
operation modes are supported.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/scripts/coccinelle/misc/add_namespace.cocci?id=eb8305aecb958e8787e7d603c7765c1dcace3a2b
https://bottest.wiki.kernel.org/coccicheck#modes

Regards,
Markus

2019-09-29 13:14:15

by Markus Elfring

[permalink] [raw]
Subject: Re: [Cocci] [RFC PATCH] scripts: Fix coccicheck failed

> rename scripts/{coccinelle/misc => }/add_namespace.cocci (100%)

I hope that such a SmPL script can be also independently used from
the other known call interface.

I suggest to think a bit more about the desired directory hierarchy.
If you would like to keep these files generally within a (sub)folder
of “scripts/coccinelle”, other solutions should be taken into account.
How do you think about to adjust the filter command?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccicheck?id=02dc96ef6c25f990452c114c59d75c368a1f4c8f#n257

* Which criteria should be finally chosen for automatic script execution?

* Would you like to reconsider any more consequences around collateral evolution?

Regards,
Markus

2019-09-29 16:33:50

by Julia Lawall

[permalink] [raw]
Subject: Re: [RFC PATCH] scripts: Fix coccicheck failed



On Sun, 29 Sep 2019, Yuehaibing wrote:

> On 2019/9/28 20:43, Julia Lawall wrote:
> >
> >
> > On Sat, 28 Sep 2019, YueHaibing wrote:
> >
> >> Run make coccicheck, I got this:
> >>
> >> spatch -D patch --no-show-diff --very-quiet --cocci-file
> >> ./scripts/coccinelle/misc/add_namespace.cocci --dir .
> >> -I ./arch/x86/include -I ./arch/x86/include/generated
> >> -I ./include -I ./arch/x86/include/uapi
> >> -I ./arch/x86/include/generated/uapi -I ./include/uapi
> >> -I ./include/generated/uapi --include ./include/linux/kconfig.h
> >> --jobs 192 --chunksize 1
> >>
> >> virtual rule patch not supported
> >> coccicheck failed
> >>
> >> It seems add_namespace.cocci cannot be called in coccicheck.
> >
> > Could you explain the issue better? Does the current state cause make
> > coccicheck to fail? Or is it just silently not being called?
>
> Yes, it cause make coccicheck failed like this:
>
> ...
> ./drivers/xen/xenbus/xenbus_comms.c:290:2-8: preceding lock on line 243
> ./fs/fuse/dev.c:1227:2-8: preceding lock on line 1206
> ./fs/fuse/dev.c:1232:3-9: preceding lock on line 1206
> coccicheck failed
> make[1]: *** [coccicheck] Error 255
> make: *** [sub-make] Error 2

Could you set the verbose options to see what the problem is? Maybe the
problem would be solved by putting virtual report at the top of the rule.
But it might still fail because nothing can happen without a value for the
virtual metavariable ns.

Should the coccinelle directory be only for things that work with make
coccicheck, or for all Coccinelle scripts?

julia

2019-09-29 16:41:29

by Julia Lawall

[permalink] [raw]
Subject: Re: [Cocci] [RFC PATCH] scripts: Fix coccicheck failed

> I suggest to think a bit more about the desired directory hierarchy.
> If you would like to keep these files generally within a (sub)folder
> of “scripts/coccinelle”, other solutions should be taken into account.
> How do you think about to adjust the filter command?
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccicheck?id=02dc96ef6c25f990452c114c59d75c368a1f4c8f#n257

Changing this could also be a solution.

julia

2019-09-29 18:02:52

by Markus Elfring

[permalink] [raw]
Subject: Re: [Cocci] [RFC PATCH] scripts: Fix coccicheck failed

> Maybe the problem would be solved by putting virtual report at the top of the rule.

I assume that support for the operation mode “patch” can eventually be considered.


> But it might still fail because nothing can happen without a value
> for the virtual metavariable ns.

I imagine that the safe handling of this command line input parameter
will trigger further software development concerns.


> Should the coccinelle directory be only for things that work with make coccicheck,

I hope not.

But it seems that a filter command expressed such a restriction so far.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccicheck?id=02dc96ef6c25f990452c114c59d75c368a1f4c8f#n257

Is this place an update candidate now?


> or for all Coccinelle scripts?

I would prefer file storage selections in this direction.
How do you think about to improve the software taxonomy accordingly?

Regards,
Markus

2019-09-29 18:06:16

by Julia Lawall

[permalink] [raw]
Subject: Re: [Cocci] [RFC PATCH] scripts: Fix coccicheck failed



On Sun, 29 Sep 2019, Markus Elfring wrote:

> > Maybe the problem would be solved by putting virtual report at the top of the rule.
>
> I assume that support for the operation mode “patch” can eventually be considered.
>

Coccicheck requires that all rules support the report mode.

julia

>
> > But it might still fail because nothing can happen without a value
> > for the virtual metavariable ns.
>
> I imagine that the safe handling of this command line input parameter
> will trigger further software development concerns.
>
>
> > Should the coccinelle directory be only for things that work with make coccicheck,
>
> I hope not.
>
> But it seems that a filter command expressed such a restriction so far.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccicheck?id=02dc96ef6c25f990452c114c59d75c368a1f4c8f#n257
>
> Is this place an update candidate now?
>
>
> > or for all Coccinelle scripts?
>
> I would prefer file storage selections in this direction.
> How do you think about to improve the software taxonomy accordingly?
>
> Regards,
> Markus
>

2019-09-29 18:19:20

by Markus Elfring

[permalink] [raw]
Subject: Re: [Cocci] [RFC] scripts: Fix coccicheck failed

> Coccicheck requires that all rules support the report mode.

I find this requirement not so clear while this operation mode
is reasonable as a default selection.
https://bottest.wiki.kernel.org/coccicheck#modes

I am curious how the software will evolve further also in this area.
Possible solutions might become more interesting in other directions.

Regards,
Markus

2019-09-30 02:34:59

by Yue Haibing

[permalink] [raw]
Subject: Re: [RFC PATCH] scripts: Fix coccicheck failed

On 2019/9/30 0:32, Julia Lawall wrote:
>
>
> On Sun, 29 Sep 2019, Yuehaibing wrote:
>
>> On 2019/9/28 20:43, Julia Lawall wrote:
>>>
>>>
>>> On Sat, 28 Sep 2019, YueHaibing wrote:
>>>
>>>> Run make coccicheck, I got this:
>>>>
>>>> spatch -D patch --no-show-diff --very-quiet --cocci-file
>>>> ./scripts/coccinelle/misc/add_namespace.cocci --dir .
>>>> -I ./arch/x86/include -I ./arch/x86/include/generated
>>>> -I ./include -I ./arch/x86/include/uapi
>>>> -I ./arch/x86/include/generated/uapi -I ./include/uapi
>>>> -I ./include/generated/uapi --include ./include/linux/kconfig.h
>>>> --jobs 192 --chunksize 1
>>>>
>>>> virtual rule patch not supported
>>>> coccicheck failed
>>>>
>>>> It seems add_namespace.cocci cannot be called in coccicheck.
>>>
>>> Could you explain the issue better? Does the current state cause make
>>> coccicheck to fail? Or is it just silently not being called?
>>
>> Yes, it cause make coccicheck failed like this:
>>
>> ...
>> ./drivers/xen/xenbus/xenbus_comms.c:290:2-8: preceding lock on line 243
>> ./fs/fuse/dev.c:1227:2-8: preceding lock on line 1206
>> ./fs/fuse/dev.c:1232:3-9: preceding lock on line 1206
>> coccicheck failed
>> make[1]: *** [coccicheck] Error 255
>> make: *** [sub-make] Error 2
>
> Could you set the verbose options to see what the problem is? Maybe the
> problem would be solved by putting virtual report at the top of the rule.
> But it might still fail because nothing can happen without a value for the
> virtual metavariable ns.

diff --git a/scripts/coccinelle/misc/add_namespace.cocci b/scripts/coccinelle/misc/add_namespace.cocci
index c832bb6445a8..99e93a6c2e24 100644
--- a/scripts/coccinelle/misc/add_namespace.cocci
+++ b/scripts/coccinelle/misc/add_namespace.cocci
@@ -6,6 +6,8 @@
/// add a missing namespace tag to a module source file.
///

+virtual report
+
@has_ns_import@
declarer name MODULE_IMPORT_NS;
identifier virtual.ns;



Adding virtual report make the coccicheck go ahead smoothly.

>
> Should the coccinelle directory be only for things that work with make
> coccicheck, or for all Coccinelle scripts?
>
> julia
>
> .
>

2019-10-01 12:59:05

by Matthias Männich

[permalink] [raw]
Subject: Re: [RFC PATCH] scripts: Fix coccicheck failed

Hi Yuehaibing!

On Mon, Sep 30, 2019 at 10:32:18AM +0800, Yuehaibing wrote:
>On 2019/9/30 0:32, Julia Lawall wrote:
>>
>>
>> On Sun, 29 Sep 2019, Yuehaibing wrote:
>>
>>> On 2019/9/28 20:43, Julia Lawall wrote:
>>>>
>>>>
>>>> On Sat, 28 Sep 2019, YueHaibing wrote:
>>>>
>>>>> Run make coccicheck, I got this:
>>>>>
>>>>> spatch -D patch --no-show-diff --very-quiet --cocci-file
>>>>> ./scripts/coccinelle/misc/add_namespace.cocci --dir .
>>>>> -I ./arch/x86/include -I ./arch/x86/include/generated
>>>>> -I ./include -I ./arch/x86/include/uapi
>>>>> -I ./arch/x86/include/generated/uapi -I ./include/uapi
>>>>> -I ./include/generated/uapi --include ./include/linux/kconfig.h
>>>>> --jobs 192 --chunksize 1
>>>>>
>>>>> virtual rule patch not supported
>>>>> coccicheck failed
>>>>>
>>>>> It seems add_namespace.cocci cannot be called in coccicheck.
>>>>
>>>> Could you explain the issue better? Does the current state cause make
>>>> coccicheck to fail? Or is it just silently not being called?
>>>
>>> Yes, it cause make coccicheck failed like this:
>>>
>>> ...
>>> ./drivers/xen/xenbus/xenbus_comms.c:290:2-8: preceding lock on line 243
>>> ./fs/fuse/dev.c:1227:2-8: preceding lock on line 1206
>>> ./fs/fuse/dev.c:1232:3-9: preceding lock on line 1206
>>> coccicheck failed
>>> make[1]: *** [coccicheck] Error 255
>>> make: *** [sub-make] Error 2
>>
>> Could you set the verbose options to see what the problem is? Maybe the
>> problem would be solved by putting virtual report at the top of the rule.
>> But it might still fail because nothing can happen without a value for the
>> virtual metavariable ns.
>
>diff --git a/scripts/coccinelle/misc/add_namespace.cocci b/scripts/coccinelle/misc/add_namespace.cocci
>index c832bb6445a8..99e93a6c2e24 100644
>--- a/scripts/coccinelle/misc/add_namespace.cocci
>+++ b/scripts/coccinelle/misc/add_namespace.cocci
>@@ -6,6 +6,8 @@
> /// add a missing namespace tag to a module source file.
> ///
>
>+virtual report
>+
> @has_ns_import@
> declarer name MODULE_IMPORT_NS;
> identifier virtual.ns;
>
>
>
>Adding virtual report make the coccicheck go ahead smoothly.

Thanks for reporting and following up with this issue. I certainly did
not expect all scripts in scripts/coccinelle to be automatically called
by coccicheck and I still think scripts/coccinelle is the right location
for add_namespace.cocci.

I guess, others might better understand the implications of your two
lines fix above, but it looks good to me to address the problem.

Thanks!

>>
>> Should the coccinelle directory be only for things that work with make
>> coccicheck, or for all Coccinelle scripts?

At least I was not expecting this behaviour. Though scripts/ hosts
scripts of various languages, I still think putting all coccinelle
scripts in scripts/coccinelle sounds sensible.

>>
>> julia
>>
>> .
>>
>

Cheers,
Matthias

2019-10-01 13:07:06

by Julia Lawall

[permalink] [raw]
Subject: Re: [RFC PATCH] scripts: Fix coccicheck failed



On Mon, 30 Sep 2019, Yuehaibing wrote:

> On 2019/9/30 0:32, Julia Lawall wrote:
> >
> >
> > On Sun, 29 Sep 2019, Yuehaibing wrote:
> >
> >> On 2019/9/28 20:43, Julia Lawall wrote:
> >>>
> >>>
> >>> On Sat, 28 Sep 2019, YueHaibing wrote:
> >>>
> >>>> Run make coccicheck, I got this:
> >>>>
> >>>> spatch -D patch --no-show-diff --very-quiet --cocci-file
> >>>> ./scripts/coccinelle/misc/add_namespace.cocci --dir .
> >>>> -I ./arch/x86/include -I ./arch/x86/include/generated
> >>>> -I ./include -I ./arch/x86/include/uapi
> >>>> -I ./arch/x86/include/generated/uapi -I ./include/uapi
> >>>> -I ./include/generated/uapi --include ./include/linux/kconfig.h
> >>>> --jobs 192 --chunksize 1
> >>>>
> >>>> virtual rule patch not supported
> >>>> coccicheck failed
> >>>>
> >>>> It seems add_namespace.cocci cannot be called in coccicheck.
> >>>
> >>> Could you explain the issue better? Does the current state cause make
> >>> coccicheck to fail? Or is it just silently not being called?
> >>
> >> Yes, it cause make coccicheck failed like this:
> >>
> >> ...
> >> ./drivers/xen/xenbus/xenbus_comms.c:290:2-8: preceding lock on line 243
> >> ./fs/fuse/dev.c:1227:2-8: preceding lock on line 1206
> >> ./fs/fuse/dev.c:1232:3-9: preceding lock on line 1206
> >> coccicheck failed
> >> make[1]: *** [coccicheck] Error 255
> >> make: *** [sub-make] Error 2
> >
> > Could you set the verbose options to see what the problem is? Maybe the
> > problem would be solved by putting virtual report at the top of the rule.
> > But it might still fail because nothing can happen without a value for the
> > virtual metavariable ns.
>
> diff --git a/scripts/coccinelle/misc/add_namespace.cocci b/scripts/coccinelle/misc/add_namespace.cocci
> index c832bb6445a8..99e93a6c2e24 100644
> --- a/scripts/coccinelle/misc/add_namespace.cocci
> +++ b/scripts/coccinelle/misc/add_namespace.cocci
> @@ -6,6 +6,8 @@
> /// add a missing namespace tag to a module source file.
> ///
>
> +virtual report
> +
> @has_ns_import@
> declarer name MODULE_IMPORT_NS;
> identifier virtual.ns;
>
>
>
> Adding virtual report make the coccicheck go ahead smoothly.

Acked-by: Julia Lawall <[email protected]>

Thanks.


>
> >
> > Should the coccinelle directory be only for things that work with make
> > coccicheck, or for all Coccinelle scripts?
> >
> > julia
> >
> > .
> >
>
>

2019-10-01 15:37:38

by Markus Elfring

[permalink] [raw]
Subject: Re: [Cocci] [RFC] scripts: Fix coccicheck failed

> >+virtual report
> >+
> > @has_ns_import@
> > declarer name MODULE_IMPORT_NS;
> > identifier virtual.ns;
> >
> >Adding virtual report make the coccicheck go ahead smoothly.

Such an adjustment might be an interesting solution.


> Thanks for reporting and following up with this issue. I certainly did
> not expect all scripts in scripts/coccinelle to be automatically called
> by coccicheck

Did you (or any other contributor) test the collaboration of the added
small SmPL file with the known call interface?


> and I still think scripts/coccinelle is the right location
> for add_namespace.cocci.

I got additional software development ideas around this view in the meantime.
Would you like to take any other collateral evolution better into account?

Regards,
Markus

2019-10-02 07:20:05

by Markus Elfring

[permalink] [raw]
Subject: [PATCH 0/2] Coccinelle: Extend directory hierarchy

From: Markus Elfring <[email protected]>
Date: Wed, 2 Oct 2019 09:05:09 +0200

Introduce a specific directory structure as a fix for a recently added
script for the semantic patch language. Pick this opportunity up
for another collateral evolution.

Markus Elfring (2):
Move the SmPL script “add_namespace.cocci” into a new directory
Move coccicheck directories into a new subdirectory

scripts/coccicheck | 2 +-
.../{ => coccicheck/default}/api/alloc/alloc_cast.cocci | 0
.../{ => coccicheck/default}/api/alloc/pool_zalloc-simple.cocci | 0
.../{ => coccicheck/default}/api/alloc/zalloc-simple.cocci | 0
.../{ => coccicheck/default}/api/atomic_as_refcounter.cocci | 0
.../{ => coccicheck/default}/api/check_bq27xxx_data.cocci | 0
.../coccinelle/{ => coccicheck/default}/api/d_find_alias.cocci | 0
.../default}/api/debugfs/debugfs_simple_attr.cocci | 0
.../default}/api/devm_platform_ioremap_resource.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/api/err_cast.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/api/kstrdup.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/api/memdup.cocci | 0
.../coccinelle/{ => coccicheck/default}/api/memdup_user.cocci | 0
.../{ => coccicheck/default}/api/platform_get_irq.cocci | 0
.../{ => coccicheck/default}/api/platform_no_drv_owner.cocci | 0
.../coccinelle/{ => coccicheck/default}/api/pm_runtime.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/api/ptr_ret.cocci | 0
.../coccinelle/{ => coccicheck/default}/api/resource_size.cocci | 0
.../coccinelle/{ => coccicheck/default}/api/simple_open.cocci | 0
.../coccinelle/{ => coccicheck/default}/api/stream_open.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/api/vma_pages.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/free/clk_put.cocci | 0
.../coccinelle/{ => coccicheck/default}/free/devm_free.cocci | 0
.../coccinelle/{ => coccicheck/default}/free/ifnullfree.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/free/iounmap.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/free/kfree.cocci | 0
.../coccinelle/{ => coccicheck/default}/free/kfreeaddr.cocci | 0
.../{ => coccicheck/default}/free/pci_free_consistent.cocci | 0
.../coccinelle/{ => coccicheck/default}/free/put_device.cocci | 0
.../default}/iterators/device_node_continue.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/iterators/fen.cocci | 0
.../coccinelle/{ => coccicheck/default}/iterators/itnull.cocci | 0
.../{ => coccicheck/default}/iterators/list_entry_update.cocci | 0
.../{ => coccicheck/default}/iterators/use_after_iter.cocci | 0
.../coccinelle/{ => coccicheck/default}/locks/call_kern.cocci | 0
.../coccinelle/{ => coccicheck/default}/locks/double_lock.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/locks/flags.cocci | 0
.../coccinelle/{ => coccicheck/default}/locks/mini_lock.cocci | 0
.../coccinelle/{ => coccicheck/default}/misc/array_size.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/badty.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/boolconv.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/boolinit.cocci | 0
.../coccinelle/{ => coccicheck/default}/misc/boolreturn.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/bugon.cocci | 0
.../{ => coccicheck/default}/misc/cond_no_effect.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/cstptr.cocci | 0
.../coccinelle/{ => coccicheck/default}/misc/doubleinit.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/ifaddr.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/ifcol.cocci | 0
.../coccinelle/{ => coccicheck/default}/misc/irqf_oneshot.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/noderef.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/of_table.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/orplus.cocci | 0
.../coccinelle/{ => coccicheck/default}/misc/returnvar.cocci | 0
.../coccinelle/{ => coccicheck/default}/misc/semicolon.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/warn.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/null/badzero.cocci | 0
.../coccinelle/{ => coccicheck/default}/null/deref_null.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/null/eno.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/null/kmerr.cocci | 0
.../{ => coccicheck/default}/tests/doublebitand.cocci | 0
.../coccinelle/{ => coccicheck/default}/tests/doubletest.cocci | 0
.../coccinelle/{ => coccicheck/default}/tests/odd_ptr_err.cocci | 0
.../default}/tests/unsigned_lesser_than_zero.cocci | 0
scripts/coccinelle/{misc => direct}/add_namespace.cocci | 0
scripts/nsdeps | 2 +-
66 files changed, 2 insertions(+), 2 deletions(-)
rename scripts/coccinelle/{ => coccicheck/default}/api/alloc/alloc_cast.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/alloc/pool_zalloc-simple.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/alloc/zalloc-simple.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/atomic_as_refcounter.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/check_bq27xxx_data.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/d_find_alias.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/debugfs/debugfs_simple_attr.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/devm_platform_ioremap_resource.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/err_cast.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/kstrdup.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/memdup.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/memdup_user.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/platform_get_irq.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/platform_no_drv_owner.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/pm_runtime.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/ptr_ret.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/resource_size.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/simple_open.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/stream_open.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/vma_pages.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/free/clk_put.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/free/devm_free.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/free/ifnullfree.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/free/iounmap.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/free/kfree.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/free/kfreeaddr.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/free/pci_free_consistent.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/free/put_device.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/iterators/device_node_continue.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/iterators/fen.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/iterators/itnull.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/iterators/list_entry_update.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/iterators/use_after_iter.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/locks/call_kern.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/locks/double_lock.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/locks/flags.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/locks/mini_lock.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/array_size.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/badty.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/boolconv.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/boolinit.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/boolreturn.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/bugon.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/cond_no_effect.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/cstptr.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/doubleinit.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/ifaddr.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/ifcol.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/irqf_oneshot.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/noderef.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/of_table.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/orplus.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/returnvar.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/semicolon.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/warn.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/null/badzero.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/null/deref_null.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/null/eno.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/null/kmerr.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/tests/doublebitand.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/tests/doubletest.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/tests/odd_ptr_err.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/tests/unsigned_lesser_than_zero.cocci (100%)
rename scripts/coccinelle/{misc => direct}/add_namespace.cocci (100%)

--
2.23.0


2019-10-02 07:21:21

by Markus Elfring

[permalink] [raw]
Subject: [PATCH 1/2] Coccinelle: Move the SmPL script “add_namespace.cocci” into a new directory

From: Markus Elfring <[email protected]>
Date: Tue, 1 Oct 2019 20:56:45 +0200

The script “add_namespace.cocci” was integrated into a known directory
without taking all relevant system dependencies into account
(despite of positive code review feedback).

See also:
* Commit eb8305aecb958e8787e7d603c7765c1dcace3a2b ("scripts: Coccinelle script for namespace dependencies.")

* Topic “[Cocci] [RFC PATCH] scripts: Fix coccicheck failed”
https://lore.kernel.org/cocci/[email protected]/
https://systeme.lip6.fr/pipermail/cocci/2019-October/006351.html
https://lkml.org/lkml/2019/10/1/503


YueHaibing reported then that the standard system configuration
did not work any more as it was expected for the tool “coccicheck”.
https://lore.kernel.org/cocci/[email protected]/
https://systeme.lip6.fr/pipermail/cocci/2019-September/006341.html
https://lkml.org/lkml/2019/9/28/29

The added SmPL script was designed in the way that no corresponding
operation modes were supported so far.
This approach can also work finally if additional script execution
criteria will be taken into account.
Thus move it into a directory which will not be directly included
by the filter command of the tool “coccicheck”.

Signed-off-by: Markus Elfring <[email protected]>
---
scripts/coccinelle/{misc => direct}/add_namespace.cocci | 0
scripts/nsdeps | 2 +-
2 files changed, 1 insertion(+), 1 deletion(-)
rename scripts/coccinelle/{misc => direct}/add_namespace.cocci (100%)

diff --git a/scripts/coccinelle/misc/add_namespace.cocci b/scripts/coccinelle/direct/add_namespace.cocci
similarity index 100%
rename from scripts/coccinelle/misc/add_namespace.cocci
rename to scripts/coccinelle/direct/add_namespace.cocci
diff --git a/scripts/nsdeps b/scripts/nsdeps
index ac2b6031dd13..9000524f9347 100644
--- a/scripts/nsdeps
+++ b/scripts/nsdeps
@@ -23,7 +23,7 @@ fi

generate_deps_for_ns() {
$SPATCH --very-quiet --in-place --sp-file \
- $srctree/scripts/coccinelle/misc/add_namespace.cocci -D ns=$1 $2
+ $srctree/scripts/coccinelle/direct/add_namespace.cocci -D ns=$1 $2
}

generate_deps() {
--
2.23.0

2019-10-02 07:21:32

by Markus Elfring

[permalink] [raw]
Subject: [PATCH 2/2] Coccinelle: Move coccicheck directories into a new subdirectory

From: Markus Elfring <[email protected]>
Date: Wed, 2 Oct 2019 08:33:13 +0200

The standard system configuration for the tool “coccicheck” depends
on a specific directory for the selection of files which should be
automatically executed as scripts for the semantic patch language.
Move the needed directories into a subdirectory which indicates the support
for the default operation mode of provided files in this hierarchy.

Fixes: eb8305aecb958e8787e7d603c7765c1dcace3a2b ("scripts: Coccinelle script for namespace dependencies.")
Signed-off-by: Markus Elfring <[email protected]>
---
scripts/coccicheck | 2 +-
.../{ => coccicheck/default}/api/alloc/alloc_cast.cocci | 0
.../{ => coccicheck/default}/api/alloc/pool_zalloc-simple.cocci | 0
.../{ => coccicheck/default}/api/alloc/zalloc-simple.cocci | 0
.../{ => coccicheck/default}/api/atomic_as_refcounter.cocci | 0
.../{ => coccicheck/default}/api/check_bq27xxx_data.cocci | 0
.../coccinelle/{ => coccicheck/default}/api/d_find_alias.cocci | 0
.../default}/api/debugfs/debugfs_simple_attr.cocci | 0
.../default}/api/devm_platform_ioremap_resource.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/api/err_cast.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/api/kstrdup.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/api/memdup.cocci | 0
.../coccinelle/{ => coccicheck/default}/api/memdup_user.cocci | 0
.../{ => coccicheck/default}/api/platform_get_irq.cocci | 0
.../{ => coccicheck/default}/api/platform_no_drv_owner.cocci | 0
.../coccinelle/{ => coccicheck/default}/api/pm_runtime.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/api/ptr_ret.cocci | 0
.../coccinelle/{ => coccicheck/default}/api/resource_size.cocci | 0
.../coccinelle/{ => coccicheck/default}/api/simple_open.cocci | 0
.../coccinelle/{ => coccicheck/default}/api/stream_open.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/api/vma_pages.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/free/clk_put.cocci | 0
.../coccinelle/{ => coccicheck/default}/free/devm_free.cocci | 0
.../coccinelle/{ => coccicheck/default}/free/ifnullfree.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/free/iounmap.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/free/kfree.cocci | 0
.../coccinelle/{ => coccicheck/default}/free/kfreeaddr.cocci | 0
.../{ => coccicheck/default}/free/pci_free_consistent.cocci | 0
.../coccinelle/{ => coccicheck/default}/free/put_device.cocci | 0
.../default}/iterators/device_node_continue.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/iterators/fen.cocci | 0
.../coccinelle/{ => coccicheck/default}/iterators/itnull.cocci | 0
.../{ => coccicheck/default}/iterators/list_entry_update.cocci | 0
.../{ => coccicheck/default}/iterators/use_after_iter.cocci | 0
.../coccinelle/{ => coccicheck/default}/locks/call_kern.cocci | 0
.../coccinelle/{ => coccicheck/default}/locks/double_lock.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/locks/flags.cocci | 0
.../coccinelle/{ => coccicheck/default}/locks/mini_lock.cocci | 0
.../coccinelle/{ => coccicheck/default}/misc/array_size.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/badty.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/boolconv.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/boolinit.cocci | 0
.../coccinelle/{ => coccicheck/default}/misc/boolreturn.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/bugon.cocci | 0
.../{ => coccicheck/default}/misc/cond_no_effect.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/cstptr.cocci | 0
.../coccinelle/{ => coccicheck/default}/misc/doubleinit.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/ifaddr.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/ifcol.cocci | 0
.../coccinelle/{ => coccicheck/default}/misc/irqf_oneshot.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/noderef.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/of_table.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/orplus.cocci | 0
.../coccinelle/{ => coccicheck/default}/misc/returnvar.cocci | 0
.../coccinelle/{ => coccicheck/default}/misc/semicolon.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/misc/warn.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/null/badzero.cocci | 0
.../coccinelle/{ => coccicheck/default}/null/deref_null.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/null/eno.cocci | 0
scripts/coccinelle/{ => coccicheck/default}/null/kmerr.cocci | 0
.../{ => coccicheck/default}/tests/doublebitand.cocci | 0
.../coccinelle/{ => coccicheck/default}/tests/doubletest.cocci | 0
.../coccinelle/{ => coccicheck/default}/tests/odd_ptr_err.cocci | 0
.../default}/tests/unsigned_lesser_than_zero.cocci | 0
64 files changed, 1 insertion(+), 1 deletion(-)
rename scripts/coccinelle/{ => coccicheck/default}/api/alloc/alloc_cast.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/alloc/pool_zalloc-simple.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/alloc/zalloc-simple.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/atomic_as_refcounter.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/check_bq27xxx_data.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/d_find_alias.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/debugfs/debugfs_simple_attr.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/devm_platform_ioremap_resource.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/err_cast.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/kstrdup.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/memdup.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/memdup_user.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/platform_get_irq.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/platform_no_drv_owner.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/pm_runtime.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/ptr_ret.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/resource_size.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/simple_open.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/stream_open.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/api/vma_pages.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/free/clk_put.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/free/devm_free.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/free/ifnullfree.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/free/iounmap.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/free/kfree.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/free/kfreeaddr.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/free/pci_free_consistent.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/free/put_device.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/iterators/device_node_continue.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/iterators/fen.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/iterators/itnull.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/iterators/list_entry_update.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/iterators/use_after_iter.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/locks/call_kern.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/locks/double_lock.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/locks/flags.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/locks/mini_lock.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/array_size.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/badty.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/boolconv.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/boolinit.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/boolreturn.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/bugon.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/cond_no_effect.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/cstptr.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/doubleinit.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/ifaddr.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/ifcol.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/irqf_oneshot.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/noderef.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/of_table.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/orplus.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/returnvar.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/semicolon.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/misc/warn.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/null/badzero.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/null/deref_null.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/null/eno.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/null/kmerr.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/tests/doublebitand.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/tests/doubletest.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/tests/odd_ptr_err.cocci (100%)
rename scripts/coccinelle/{ => coccicheck/default}/tests/unsigned_lesser_than_zero.cocci (100%)

diff --git a/scripts/coccicheck b/scripts/coccicheck
index e04d328210ac..3359f3f528ba 100755
--- a/scripts/coccicheck
+++ b/scripts/coccicheck
@@ -254,7 +254,7 @@ else
fi

if [ "$COCCI" = "" ] ; then
- for f in `find $srctree/scripts/coccinelle/ -name '*.cocci' -type f | sort`; do
+ for f in `find $srctree/scripts/coccinelle/coccicheck/default/ -name '*.cocci' -type f | sort`; do
coccinelle $f
done
else
diff --git a/scripts/coccinelle/api/alloc/alloc_cast.cocci b/scripts/coccinelle/coccicheck/default/api/alloc/alloc_cast.cocci
similarity index 100%
rename from scripts/coccinelle/api/alloc/alloc_cast.cocci
rename to scripts/coccinelle/coccicheck/default/api/alloc/alloc_cast.cocci
diff --git a/scripts/coccinelle/api/alloc/pool_zalloc-simple.cocci b/scripts/coccinelle/coccicheck/default/api/alloc/pool_zalloc-simple.cocci
similarity index 100%
rename from scripts/coccinelle/api/alloc/pool_zalloc-simple.cocci
rename to scripts/coccinelle/coccicheck/default/api/alloc/pool_zalloc-simple.cocci
diff --git a/scripts/coccinelle/api/alloc/zalloc-simple.cocci b/scripts/coccinelle/coccicheck/default/api/alloc/zalloc-simple.cocci
similarity index 100%
rename from scripts/coccinelle/api/alloc/zalloc-simple.cocci
rename to scripts/coccinelle/coccicheck/default/api/alloc/zalloc-simple.cocci
diff --git a/scripts/coccinelle/api/atomic_as_refcounter.cocci b/scripts/coccinelle/coccicheck/default/api/atomic_as_refcounter.cocci
similarity index 100%
rename from scripts/coccinelle/api/atomic_as_refcounter.cocci
rename to scripts/coccinelle/coccicheck/default/api/atomic_as_refcounter.cocci
diff --git a/scripts/coccinelle/api/check_bq27xxx_data.cocci b/scripts/coccinelle/coccicheck/default/api/check_bq27xxx_data.cocci
similarity index 100%
rename from scripts/coccinelle/api/check_bq27xxx_data.cocci
rename to scripts/coccinelle/coccicheck/default/api/check_bq27xxx_data.cocci
diff --git a/scripts/coccinelle/api/d_find_alias.cocci b/scripts/coccinelle/coccicheck/default/api/d_find_alias.cocci
similarity index 100%
rename from scripts/coccinelle/api/d_find_alias.cocci
rename to scripts/coccinelle/coccicheck/default/api/d_find_alias.cocci
diff --git a/scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci b/scripts/coccinelle/coccicheck/default/api/debugfs/debugfs_simple_attr.cocci
similarity index 100%
rename from scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci
rename to scripts/coccinelle/coccicheck/default/api/debugfs/debugfs_simple_attr.cocci
diff --git a/scripts/coccinelle/api/devm_platform_ioremap_resource.cocci b/scripts/coccinelle/coccicheck/default/api/devm_platform_ioremap_resource.cocci
similarity index 100%
rename from scripts/coccinelle/api/devm_platform_ioremap_resource.cocci
rename to scripts/coccinelle/coccicheck/default/api/devm_platform_ioremap_resource.cocci
diff --git a/scripts/coccinelle/api/err_cast.cocci b/scripts/coccinelle/coccicheck/default/api/err_cast.cocci
similarity index 100%
rename from scripts/coccinelle/api/err_cast.cocci
rename to scripts/coccinelle/coccicheck/default/api/err_cast.cocci
diff --git a/scripts/coccinelle/api/kstrdup.cocci b/scripts/coccinelle/coccicheck/default/api/kstrdup.cocci
similarity index 100%
rename from scripts/coccinelle/api/kstrdup.cocci
rename to scripts/coccinelle/coccicheck/default/api/kstrdup.cocci
diff --git a/scripts/coccinelle/api/memdup.cocci b/scripts/coccinelle/coccicheck/default/api/memdup.cocci
similarity index 100%
rename from scripts/coccinelle/api/memdup.cocci
rename to scripts/coccinelle/coccicheck/default/api/memdup.cocci
diff --git a/scripts/coccinelle/api/memdup_user.cocci b/scripts/coccinelle/coccicheck/default/api/memdup_user.cocci
similarity index 100%
rename from scripts/coccinelle/api/memdup_user.cocci
rename to scripts/coccinelle/coccicheck/default/api/memdup_user.cocci
diff --git a/scripts/coccinelle/api/platform_get_irq.cocci b/scripts/coccinelle/coccicheck/default/api/platform_get_irq.cocci
similarity index 100%
rename from scripts/coccinelle/api/platform_get_irq.cocci
rename to scripts/coccinelle/coccicheck/default/api/platform_get_irq.cocci
diff --git a/scripts/coccinelle/api/platform_no_drv_owner.cocci b/scripts/coccinelle/coccicheck/default/api/platform_no_drv_owner.cocci
similarity index 100%
rename from scripts/coccinelle/api/platform_no_drv_owner.cocci
rename to scripts/coccinelle/coccicheck/default/api/platform_no_drv_owner.cocci
diff --git a/scripts/coccinelle/api/pm_runtime.cocci b/scripts/coccinelle/coccicheck/default/api/pm_runtime.cocci
similarity index 100%
rename from scripts/coccinelle/api/pm_runtime.cocci
rename to scripts/coccinelle/coccicheck/default/api/pm_runtime.cocci
diff --git a/scripts/coccinelle/api/ptr_ret.cocci b/scripts/coccinelle/coccicheck/default/api/ptr_ret.cocci
similarity index 100%
rename from scripts/coccinelle/api/ptr_ret.cocci
rename to scripts/coccinelle/coccicheck/default/api/ptr_ret.cocci
diff --git a/scripts/coccinelle/api/resource_size.cocci b/scripts/coccinelle/coccicheck/default/api/resource_size.cocci
similarity index 100%
rename from scripts/coccinelle/api/resource_size.cocci
rename to scripts/coccinelle/coccicheck/default/api/resource_size.cocci
diff --git a/scripts/coccinelle/api/simple_open.cocci b/scripts/coccinelle/coccicheck/default/api/simple_open.cocci
similarity index 100%
rename from scripts/coccinelle/api/simple_open.cocci
rename to scripts/coccinelle/coccicheck/default/api/simple_open.cocci
diff --git a/scripts/coccinelle/api/stream_open.cocci b/scripts/coccinelle/coccicheck/default/api/stream_open.cocci
similarity index 100%
rename from scripts/coccinelle/api/stream_open.cocci
rename to scripts/coccinelle/coccicheck/default/api/stream_open.cocci
diff --git a/scripts/coccinelle/api/vma_pages.cocci b/scripts/coccinelle/coccicheck/default/api/vma_pages.cocci
similarity index 100%
rename from scripts/coccinelle/api/vma_pages.cocci
rename to scripts/coccinelle/coccicheck/default/api/vma_pages.cocci
diff --git a/scripts/coccinelle/free/clk_put.cocci b/scripts/coccinelle/coccicheck/default/free/clk_put.cocci
similarity index 100%
rename from scripts/coccinelle/free/clk_put.cocci
rename to scripts/coccinelle/coccicheck/default/free/clk_put.cocci
diff --git a/scripts/coccinelle/free/devm_free.cocci b/scripts/coccinelle/coccicheck/default/free/devm_free.cocci
similarity index 100%
rename from scripts/coccinelle/free/devm_free.cocci
rename to scripts/coccinelle/coccicheck/default/free/devm_free.cocci
diff --git a/scripts/coccinelle/free/ifnullfree.cocci b/scripts/coccinelle/coccicheck/default/free/ifnullfree.cocci
similarity index 100%
rename from scripts/coccinelle/free/ifnullfree.cocci
rename to scripts/coccinelle/coccicheck/default/free/ifnullfree.cocci
diff --git a/scripts/coccinelle/free/iounmap.cocci b/scripts/coccinelle/coccicheck/default/free/iounmap.cocci
similarity index 100%
rename from scripts/coccinelle/free/iounmap.cocci
rename to scripts/coccinelle/coccicheck/default/free/iounmap.cocci
diff --git a/scripts/coccinelle/free/kfree.cocci b/scripts/coccinelle/coccicheck/default/free/kfree.cocci
similarity index 100%
rename from scripts/coccinelle/free/kfree.cocci
rename to scripts/coccinelle/coccicheck/default/free/kfree.cocci
diff --git a/scripts/coccinelle/free/kfreeaddr.cocci b/scripts/coccinelle/coccicheck/default/free/kfreeaddr.cocci
similarity index 100%
rename from scripts/coccinelle/free/kfreeaddr.cocci
rename to scripts/coccinelle/coccicheck/default/free/kfreeaddr.cocci
diff --git a/scripts/coccinelle/free/pci_free_consistent.cocci b/scripts/coccinelle/coccicheck/default/free/pci_free_consistent.cocci
similarity index 100%
rename from scripts/coccinelle/free/pci_free_consistent.cocci
rename to scripts/coccinelle/coccicheck/default/free/pci_free_consistent.cocci
diff --git a/scripts/coccinelle/free/put_device.cocci b/scripts/coccinelle/coccicheck/default/free/put_device.cocci
similarity index 100%
rename from scripts/coccinelle/free/put_device.cocci
rename to scripts/coccinelle/coccicheck/default/free/put_device.cocci
diff --git a/scripts/coccinelle/iterators/device_node_continue.cocci b/scripts/coccinelle/coccicheck/default/iterators/device_node_continue.cocci
similarity index 100%
rename from scripts/coccinelle/iterators/device_node_continue.cocci
rename to scripts/coccinelle/coccicheck/default/iterators/device_node_continue.cocci
diff --git a/scripts/coccinelle/iterators/fen.cocci b/scripts/coccinelle/coccicheck/default/iterators/fen.cocci
similarity index 100%
rename from scripts/coccinelle/iterators/fen.cocci
rename to scripts/coccinelle/coccicheck/default/iterators/fen.cocci
diff --git a/scripts/coccinelle/iterators/itnull.cocci b/scripts/coccinelle/coccicheck/default/iterators/itnull.cocci
similarity index 100%
rename from scripts/coccinelle/iterators/itnull.cocci
rename to scripts/coccinelle/coccicheck/default/iterators/itnull.cocci
diff --git a/scripts/coccinelle/iterators/list_entry_update.cocci b/scripts/coccinelle/coccicheck/default/iterators/list_entry_update.cocci
similarity index 100%
rename from scripts/coccinelle/iterators/list_entry_update.cocci
rename to scripts/coccinelle/coccicheck/default/iterators/list_entry_update.cocci
diff --git a/scripts/coccinelle/iterators/use_after_iter.cocci b/scripts/coccinelle/coccicheck/default/iterators/use_after_iter.cocci
similarity index 100%
rename from scripts/coccinelle/iterators/use_after_iter.cocci
rename to scripts/coccinelle/coccicheck/default/iterators/use_after_iter.cocci
diff --git a/scripts/coccinelle/locks/call_kern.cocci b/scripts/coccinelle/coccicheck/default/locks/call_kern.cocci
similarity index 100%
rename from scripts/coccinelle/locks/call_kern.cocci
rename to scripts/coccinelle/coccicheck/default/locks/call_kern.cocci
diff --git a/scripts/coccinelle/locks/double_lock.cocci b/scripts/coccinelle/coccicheck/default/locks/double_lock.cocci
similarity index 100%
rename from scripts/coccinelle/locks/double_lock.cocci
rename to scripts/coccinelle/coccicheck/default/locks/double_lock.cocci
diff --git a/scripts/coccinelle/locks/flags.cocci b/scripts/coccinelle/coccicheck/default/locks/flags.cocci
similarity index 100%
rename from scripts/coccinelle/locks/flags.cocci
rename to scripts/coccinelle/coccicheck/default/locks/flags.cocci
diff --git a/scripts/coccinelle/locks/mini_lock.cocci b/scripts/coccinelle/coccicheck/default/locks/mini_lock.cocci
similarity index 100%
rename from scripts/coccinelle/locks/mini_lock.cocci
rename to scripts/coccinelle/coccicheck/default/locks/mini_lock.cocci
diff --git a/scripts/coccinelle/misc/array_size.cocci b/scripts/coccinelle/coccicheck/default/misc/array_size.cocci
similarity index 100%
rename from scripts/coccinelle/misc/array_size.cocci
rename to scripts/coccinelle/coccicheck/default/misc/array_size.cocci
diff --git a/scripts/coccinelle/misc/badty.cocci b/scripts/coccinelle/coccicheck/default/misc/badty.cocci
similarity index 100%
rename from scripts/coccinelle/misc/badty.cocci
rename to scripts/coccinelle/coccicheck/default/misc/badty.cocci
diff --git a/scripts/coccinelle/misc/boolconv.cocci b/scripts/coccinelle/coccicheck/default/misc/boolconv.cocci
similarity index 100%
rename from scripts/coccinelle/misc/boolconv.cocci
rename to scripts/coccinelle/coccicheck/default/misc/boolconv.cocci
diff --git a/scripts/coccinelle/misc/boolinit.cocci b/scripts/coccinelle/coccicheck/default/misc/boolinit.cocci
similarity index 100%
rename from scripts/coccinelle/misc/boolinit.cocci
rename to scripts/coccinelle/coccicheck/default/misc/boolinit.cocci
diff --git a/scripts/coccinelle/misc/boolreturn.cocci b/scripts/coccinelle/coccicheck/default/misc/boolreturn.cocci
similarity index 100%
rename from scripts/coccinelle/misc/boolreturn.cocci
rename to scripts/coccinelle/coccicheck/default/misc/boolreturn.cocci
diff --git a/scripts/coccinelle/misc/bugon.cocci b/scripts/coccinelle/coccicheck/default/misc/bugon.cocci
similarity index 100%
rename from scripts/coccinelle/misc/bugon.cocci
rename to scripts/coccinelle/coccicheck/default/misc/bugon.cocci
diff --git a/scripts/coccinelle/misc/cond_no_effect.cocci b/scripts/coccinelle/coccicheck/default/misc/cond_no_effect.cocci
similarity index 100%
rename from scripts/coccinelle/misc/cond_no_effect.cocci
rename to scripts/coccinelle/coccicheck/default/misc/cond_no_effect.cocci
diff --git a/scripts/coccinelle/misc/cstptr.cocci b/scripts/coccinelle/coccicheck/default/misc/cstptr.cocci
similarity index 100%
rename from scripts/coccinelle/misc/cstptr.cocci
rename to scripts/coccinelle/coccicheck/default/misc/cstptr.cocci
diff --git a/scripts/coccinelle/misc/doubleinit.cocci b/scripts/coccinelle/coccicheck/default/misc/doubleinit.cocci
similarity index 100%
rename from scripts/coccinelle/misc/doubleinit.cocci
rename to scripts/coccinelle/coccicheck/default/misc/doubleinit.cocci
diff --git a/scripts/coccinelle/misc/ifaddr.cocci b/scripts/coccinelle/coccicheck/default/misc/ifaddr.cocci
similarity index 100%
rename from scripts/coccinelle/misc/ifaddr.cocci
rename to scripts/coccinelle/coccicheck/default/misc/ifaddr.cocci
diff --git a/scripts/coccinelle/misc/ifcol.cocci b/scripts/coccinelle/coccicheck/default/misc/ifcol.cocci
similarity index 100%
rename from scripts/coccinelle/misc/ifcol.cocci
rename to scripts/coccinelle/coccicheck/default/misc/ifcol.cocci
diff --git a/scripts/coccinelle/misc/irqf_oneshot.cocci b/scripts/coccinelle/coccicheck/default/misc/irqf_oneshot.cocci
similarity index 100%
rename from scripts/coccinelle/misc/irqf_oneshot.cocci
rename to scripts/coccinelle/coccicheck/default/misc/irqf_oneshot.cocci
diff --git a/scripts/coccinelle/misc/noderef.cocci b/scripts/coccinelle/coccicheck/default/misc/noderef.cocci
similarity index 100%
rename from scripts/coccinelle/misc/noderef.cocci
rename to scripts/coccinelle/coccicheck/default/misc/noderef.cocci
diff --git a/scripts/coccinelle/misc/of_table.cocci b/scripts/coccinelle/coccicheck/default/misc/of_table.cocci
similarity index 100%
rename from scripts/coccinelle/misc/of_table.cocci
rename to scripts/coccinelle/coccicheck/default/misc/of_table.cocci
diff --git a/scripts/coccinelle/misc/orplus.cocci b/scripts/coccinelle/coccicheck/default/misc/orplus.cocci
similarity index 100%
rename from scripts/coccinelle/misc/orplus.cocci
rename to scripts/coccinelle/coccicheck/default/misc/orplus.cocci
diff --git a/scripts/coccinelle/misc/returnvar.cocci b/scripts/coccinelle/coccicheck/default/misc/returnvar.cocci
similarity index 100%
rename from scripts/coccinelle/misc/returnvar.cocci
rename to scripts/coccinelle/coccicheck/default/misc/returnvar.cocci
diff --git a/scripts/coccinelle/misc/semicolon.cocci b/scripts/coccinelle/coccicheck/default/misc/semicolon.cocci
similarity index 100%
rename from scripts/coccinelle/misc/semicolon.cocci
rename to scripts/coccinelle/coccicheck/default/misc/semicolon.cocci
diff --git a/scripts/coccinelle/misc/warn.cocci b/scripts/coccinelle/coccicheck/default/misc/warn.cocci
similarity index 100%
rename from scripts/coccinelle/misc/warn.cocci
rename to scripts/coccinelle/coccicheck/default/misc/warn.cocci
diff --git a/scripts/coccinelle/null/badzero.cocci b/scripts/coccinelle/coccicheck/default/null/badzero.cocci
similarity index 100%
rename from scripts/coccinelle/null/badzero.cocci
rename to scripts/coccinelle/coccicheck/default/null/badzero.cocci
diff --git a/scripts/coccinelle/null/deref_null.cocci b/scripts/coccinelle/coccicheck/default/null/deref_null.cocci
similarity index 100%
rename from scripts/coccinelle/null/deref_null.cocci
rename to scripts/coccinelle/coccicheck/default/null/deref_null.cocci
diff --git a/scripts/coccinelle/null/eno.cocci b/scripts/coccinelle/coccicheck/default/null/eno.cocci
similarity index 100%
rename from scripts/coccinelle/null/eno.cocci
rename to scripts/coccinelle/coccicheck/default/null/eno.cocci
diff --git a/scripts/coccinelle/null/kmerr.cocci b/scripts/coccinelle/coccicheck/default/null/kmerr.cocci
similarity index 100%
rename from scripts/coccinelle/null/kmerr.cocci
rename to scripts/coccinelle/coccicheck/default/null/kmerr.cocci
diff --git a/scripts/coccinelle/tests/doublebitand.cocci b/scripts/coccinelle/coccicheck/default/tests/doublebitand.cocci
similarity index 100%
rename from scripts/coccinelle/tests/doublebitand.cocci
rename to scripts/coccinelle/coccicheck/default/tests/doublebitand.cocci
diff --git a/scripts/coccinelle/tests/doubletest.cocci b/scripts/coccinelle/coccicheck/default/tests/doubletest.cocci
similarity index 100%
rename from scripts/coccinelle/tests/doubletest.cocci
rename to scripts/coccinelle/coccicheck/default/tests/doubletest.cocci
diff --git a/scripts/coccinelle/tests/odd_ptr_err.cocci b/scripts/coccinelle/coccicheck/default/tests/odd_ptr_err.cocci
similarity index 100%
rename from scripts/coccinelle/tests/odd_ptr_err.cocci
rename to scripts/coccinelle/coccicheck/default/tests/odd_ptr_err.cocci
diff --git a/scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci b/scripts/coccinelle/coccicheck/default/tests/unsigned_lesser_than_zero.cocci
similarity index 100%
rename from scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci
rename to scripts/coccinelle/coccicheck/default/tests/unsigned_lesser_than_zero.cocci
--
2.23.0

2019-10-03 11:59:25

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [RFC PATCH] scripts: Fix coccicheck failed

On Tue, Oct 1, 2019 at 10:01 PM Julia Lawall <[email protected]> wrote:
> > diff --git a/scripts/coccinelle/misc/add_namespace.cocci b/scripts/coccinelle/misc/add_namespace.cocci
> > index c832bb6445a8..99e93a6c2e24 100644
> > --- a/scripts/coccinelle/misc/add_namespace.cocci
> > +++ b/scripts/coccinelle/misc/add_namespace.cocci
> > @@ -6,6 +6,8 @@
> > /// add a missing namespace tag to a module source file.
> > ///
> >
> > +virtual report
> > +
> > @has_ns_import@
> > declarer name MODULE_IMPORT_NS;
> > identifier virtual.ns;
> >
> >
> >
> > Adding virtual report make the coccicheck go ahead smoothly.
>
> Acked-by: Julia Lawall <[email protected]>
>


Was this patch posted somewhere?



--
Best Regards
Masahiro Yamada

2019-10-03 12:24:03

by Julia Lawall

[permalink] [raw]
Subject: Re: [RFC PATCH] scripts: Fix coccicheck failed



On Thu, 3 Oct 2019, Masahiro Yamada wrote:

> On Tue, Oct 1, 2019 at 10:01 PM Julia Lawall <[email protected]> wrote:
> > > diff --git a/scripts/coccinelle/misc/add_namespace.cocci b/scripts/coccinelle/misc/add_namespace.cocci
> > > index c832bb6445a8..99e93a6c2e24 100644
> > > --- a/scripts/coccinelle/misc/add_namespace.cocci
> > > +++ b/scripts/coccinelle/misc/add_namespace.cocci
> > > @@ -6,6 +6,8 @@
> > > /// add a missing namespace tag to a module source file.
> > > ///
> > >
> > > +virtual report
> > > +
> > > @has_ns_import@
> > > declarer name MODULE_IMPORT_NS;
> > > identifier virtual.ns;
> > >
> > >
> > >
> > > Adding virtual report make the coccicheck go ahead smoothly.
> >
> > Acked-by: Julia Lawall <[email protected]>
> >
>
>
> Was this patch posted somewhere?

It was probably waiting for moderation in the cocci mailing list. Do you
have it now (or in a few minutes)?

julia

2019-10-03 16:33:28

by Markus Elfring

[permalink] [raw]
Subject: Re: [Cocci] [RFC] scripts: Fix coccicheck failed

> Was this patch posted somewhere?

Yes, of course.

YueHaibing's update suggestions are available also by the usual
mailing list archive interfaces.
How do you think about to avoid the addition of the SmPL variable
“virtual report” to the script “add_namespace.cocci” if you would dare
to integrate my change proposal for an adjusted directory hierarchy?

Regards,
Markus

2019-10-03 17:13:33

by Markus Elfring

[permalink] [raw]
Subject: Re: [Cocci] [RFC] scripts: Fix coccicheck failed

> Was this patch posted somewhere?

Yes, of course.

YueHaibing's update suggestions are available also by the usual
mailing list archive interfaces.
How do you think about to avoid the addition of the SmPL variable
“virtual report” to the script “add_namespace.cocci” if you would dare
to integrate my change proposal for an adjusted directory hierarchy?

Regards,
Markus

2019-10-03 19:38:34

by Julia Lawall

[permalink] [raw]
Subject: Re: [Cocci] [RFC] scripts: Fix coccicheck failed



On Thu, 3 Oct 2019, Markus Elfring wrote:

> > Was this patch posted somewhere?
>
> Yes, of course.
>
> YueHaibing's update suggestions are available also by the usual
> mailing list archive interfaces.
> How do you think about to avoid the addition of the SmPL variable
> “virtual report” to the script “add_namespace.cocci” if you would dare
> to integrate my change proposal for an adjusted directory hierarchy?

Perhaps I'm lazy, but i seems simpler to add 20 characters than to move
all of the files around...

julia

2019-10-04 08:00:13

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [RFC PATCH] scripts: Fix coccicheck failed

On Thu, Oct 3, 2019 at 9:23 PM Julia Lawall <[email protected]> wrote:
>
>
>
> On Thu, 3 Oct 2019, Masahiro Yamada wrote:
>
> > On Tue, Oct 1, 2019 at 10:01 PM Julia Lawall <[email protected]> wrote:
> > > > diff --git a/scripts/coccinelle/misc/add_namespace.cocci b/scripts/coccinelle/misc/add_namespace.cocci
> > > > index c832bb6445a8..99e93a6c2e24 100644
> > > > --- a/scripts/coccinelle/misc/add_namespace.cocci
> > > > +++ b/scripts/coccinelle/misc/add_namespace.cocci
> > > > @@ -6,6 +6,8 @@
> > > > /// add a missing namespace tag to a module source file.
> > > > ///
> > > >
> > > > +virtual report
> > > > +
> > > > @has_ns_import@
> > > > declarer name MODULE_IMPORT_NS;
> > > > identifier virtual.ns;
> > > >
> > > >
> > > >
> > > > Adding virtual report make the coccicheck go ahead smoothly.
> > >
> > > Acked-by: Julia Lawall <[email protected]>
> > >
> >
> >
> > Was this patch posted somewhere?
>
> It was probably waiting for moderation in the cocci mailing list. Do you
> have it now (or in a few minutes)?

No. I do not see it yet.

I want to pick the patch from LKML Patchwork
https://lore.kernel.org/patchwork/project/lkml/list/

You gave Acked-by to the one-liner fix "virtual report",
and I am happy to apply it to my tree.

YueHaibing, could you submit it as a patch?


--
Best Regards
Masahiro Yamada

2019-10-04 08:32:37

by Markus Elfring

[permalink] [raw]
Subject: Re: [Cocci] [RFC] scripts: Fix coccicheck failed

>> How do you think about to avoid the addition of the SmPL variable
>> “virtual report” to the script “add_namespace.cocci” if you would dare
>> to integrate my change proposal for an adjusted directory hierarchy?
>
> Perhaps I'm lazy, but i seems simpler to add 20 characters than to move
> all of the files around...

I got concerned that you would interpret the difference statistics
of the published patches in this direction.

I propose to achieve a clear separation for SmPL scripts.
* Files which can be directly used (on their own).
* Coccicheck scripts which have got additional design requirements
for this call interface.


Which storage locations are you going to select for these variants?

Regards,
Markus

2019-10-05 11:25:13

by Markus Elfring

[permalink] [raw]
Subject: Re: [Cocci] [RFC] scripts: Fix coccicheck failed

> You gave Acked-by to the one-liner fix "virtual report",

It was (temporarily?) accepted to use the script “add_namespace.cocci”
without such a type of SmPL variable.


> and I am happy to apply it to my tree.

Would you like to take the change possibility into account
that the coccicheck system configuration should be adapted instead?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccicheck?id=4ea655343ce4180fe9b2c7ec8cb8ef9884a47901#n257

Regards,
Markus

2019-10-05 12:27:18

by Julia Lawall

[permalink] [raw]
Subject: Re: [Cocci] [RFC] scripts: Fix coccicheck failed



On Sat, 5 Oct 2019, Markus Elfring wrote:

> > You gave Acked-by to the one-liner fix "virtual report",
>
> It was (temporarily?) accepted to use the script “add_namespace.cocci”
> without such a type of SmPL variable.
>
>
> > and I am happy to apply it to my tree.
>
> Would you like to take the change possibility into account
> that the coccicheck system configuration should be adapted instead?
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccicheck?id=4ea655343ce4180fe9b2c7ec8cb8ef9884a47901#n257

I prefer the one line change for now. If more issues arise one can see
what is more desirable at a larger scale.

julia

>
> Regards,
> Markus
>

2019-10-05 17:52:23

by Markus Elfring

[permalink] [raw]
Subject: Re: [Cocci] [RFC] scripts: Fix coccicheck failed

>> Would you like to take the change possibility into account
>> that the coccicheck system configuration should be adapted instead?
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccicheck?id=4ea655343ce4180fe9b2c7ec8cb8ef9884a47901#n257
>
> I prefer the one line change for now.

Thanks for this information.


> If more issues arise one can see what is more desirable at a larger scale.

I suggest to reconsider the corresponding software design consequences now.

* Do you accept only SmPL scripts which will work together with
the operation mode “report” of the tool “coccicheck”?

* Under which circumstances will your change resistance evolve in the way
that a clear file type separation can be applied finally?

Regards,
Markus

2019-10-05 17:53:50

by Markus Elfring

[permalink] [raw]
Subject: Re: [Cocci] [RFC] scripts: Fix coccicheck failed

>> Would you like to take the change possibility into account
>> that the coccicheck system configuration should be adapted instead?
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccicheck?id=4ea655343ce4180fe9b2c7ec8cb8ef9884a47901#n257
>
> I prefer the one line change for now.

Thanks for this information.


> If more issues arise one can see what is more desirable at a larger scale.

I suggest to reconsider the corresponding software design consequences now.

* Do you accept only SmPL scripts which will work together with
the operation mode “report” of the tool “coccicheck”?

* Under which circumstances will your change resistance evolve in the way
that a clear file type separation can be applied finally?

Regards,
Markus

2019-10-06 04:25:04

by Yue Haibing

[permalink] [raw]
Subject: Re: [RFC PATCH] scripts: Fix coccicheck failed



On 2019/10/4 10:32, Masahiro Yamada wrote:
> On Thu, Oct 3, 2019 at 9:23 PM Julia Lawall <[email protected]> wrote:
>>
>>
>>
>> On Thu, 3 Oct 2019, Masahiro Yamada wrote:
>>
>>> On Tue, Oct 1, 2019 at 10:01 PM Julia Lawall <[email protected]> wrote:
>>>>> diff --git a/scripts/coccinelle/misc/add_namespace.cocci b/scripts/coccinelle/misc/add_namespace.cocci
>>>>> index c832bb6445a8..99e93a6c2e24 100644
>>>>> --- a/scripts/coccinelle/misc/add_namespace.cocci
>>>>> +++ b/scripts/coccinelle/misc/add_namespace.cocci
>>>>> @@ -6,6 +6,8 @@
>>>>> /// add a missing namespace tag to a module source file.
>>>>> ///
>>>>>
>>>>> +virtual report
>>>>> +
>>>>> @has_ns_import@
>>>>> declarer name MODULE_IMPORT_NS;
>>>>> identifier virtual.ns;
>>>>>
>>>>>
>>>>>
>>>>> Adding virtual report make the coccicheck go ahead smoothly.
>>>>
>>>> Acked-by: Julia Lawall <[email protected]>
>>>>
>>>
>>>
>>> Was this patch posted somewhere?
>>
>> It was probably waiting for moderation in the cocci mailing list. Do you
>> have it now (or in a few minutes)?
>
> No. I do not see it yet.
>
> I want to pick the patch from LKML Patchwork
> https://lore.kernel.org/patchwork/project/lkml/list/
>
> You gave Acked-by to the one-liner fix "virtual report",
> and I am happy to apply it to my tree.
>
> YueHaibing, could you submit it as a patch?

Sorry for late, will send it.

>
>

2019-10-06 04:48:12

by Yue Haibing

[permalink] [raw]
Subject: [PATCH] scripts: add_namespace: Fix coccicheck failed

Now all scripts in scripts/coccinelle to be automatically called
by coccicheck. However new adding add_namespace.cocci does not
support report mode, which make coccicheck failed.
This add "virtual report" to make the coccicheck go ahead smoothly.

Fixes: eb8305aecb95 ("scripts: Coccinelle script for namespace dependencies.")
Acked-by: Julia Lawall <[email protected]>
Signed-off-by: YueHaibing <[email protected]>
---
scripts/coccinelle/misc/add_namespace.cocci | 2 ++
1 file changed, 2 insertions(+)

diff --git a/scripts/coccinelle/misc/add_namespace.cocci b/scripts/coccinelle/misc/add_namespace.cocci
index c832bb6445a8..99e93a6c2e24 100644
--- a/scripts/coccinelle/misc/add_namespace.cocci
+++ b/scripts/coccinelle/misc/add_namespace.cocci
@@ -6,6 +6,8 @@
/// add a missing namespace tag to a module source file.
///

+virtual report
+
@has_ns_import@
declarer name MODULE_IMPORT_NS;
identifier virtual.ns;
--
2.20.1


2019-10-06 05:22:35

by Markus Elfring

[permalink] [raw]
Subject: Re: [Cocci] [RFC] scripts: Fix coccicheck failed

>> Would you like to take the change possibility into account
>> that the coccicheck system configuration should be adapted instead?
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccicheck?id=4ea655343ce4180fe9b2c7ec8cb8ef9884a47901#n257
>
> I prefer the one line change for now. If more issues arise one can see
> what is more desirable at a larger scale.

I got the impression that the script “add_namespace.cocci” should never
be automatically called by the current default setting of the tool “coccicheck”
also because it requires the input parameter “name space” (SmPL identifier “virtual.ns”).
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/scripts/coccinelle/misc/add_namespace.cocci?id=eb8305aecb958e8787e7d603c7765c1dcace3a2b

Would you like to increase your software development attention for
efficient system configuration on this issue?

Regards,
Markus

2019-10-06 05:29:05

by Julia Lawall

[permalink] [raw]
Subject: Re: [Cocci] [RFC] scripts: Fix coccicheck failed



On Sun, 6 Oct 2019, Markus Elfring wrote:

> >> Would you like to take the change possibility into account
> >> that the coccicheck system configuration should be adapted instead?
> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/coccicheck?id=4ea655343ce4180fe9b2c7ec8cb8ef9884a47901#n257
> >
> > I prefer the one line change for now. If more issues arise one can see
> > what is more desirable at a larger scale.
>
> I got the impression that the script “add_namespace.cocci” should never
> be automatically called by the current default setting of the tool “coccicheck”
> also because it requires the input parameter “name space” (SmPL identifier “virtual.ns”).
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/scripts/coccinelle/misc/add_namespace.cocci?id=eb8305aecb958e8787e7d603c7765c1dcace3a2b
>
> Would you like to increase your software development attention for
> efficient system configuration on this issue?

No.

julia

2019-10-06 05:36:27

by Markus Elfring

[permalink] [raw]
Subject: Re: [Cocci] [RFC] scripts: Fix coccicheck failed

>> Would you like to increase your software development attention for
>> efficient system configuration on this issue?
>
> No.

Thanks for this information.

I am still curious if other contributors will care more for this aspect.

Regards,
Markus

2019-10-06 06:43:00

by Markus Elfring

[permalink] [raw]
Subject: Re: [PATCH] scripts: add_namespace: Fix coccicheck failed

> Now all scripts in scripts/coccinelle to be automatically called
> by coccicheck. However new adding add_namespace.cocci does not
> support report mode, which make coccicheck failed.
> This add "virtual report" to make the coccicheck go ahead smoothly.

I find that this change description needs improvements and corrections.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=43b815c6a8e7dbccb5b8bd9c4b099c24bc22d135#n151

I would find a commit subject like “scripts: add_namespace:
Add support for the default coccicheck operation mode” more appropriate
(if this software development will be clarified further in the shown direction
at all).


> Fixes: eb8305aecb95 ("scripts: Coccinelle script for namespace dependencies.")

I got the impression that a sub-optimal solution approach would be chosen here.
The automatic script execution is requested despite of the fact
that the input parameter “name space” (SmPL identifier “virtual.ns”)
will be required.

I am curious under which circumstances an other transformation
can become more attractive.
[PATCH 0/2] Coccinelle: Extend directory hierarchy
https://lore.kernel.org/cocci/[email protected]/
https://lore.kernel.org/patchwork/project/lkml/list/?series=412494
https://lkml.org/lkml/2019/10/2/60


> +++ b/scripts/coccinelle/misc/add_namespace.cocci
> @@ -6,6 +6,8 @@
> /// add a missing namespace tag to a module source file.
> ///
>
> +virtual report
> +
> @has_ns_import@

If you would insist on the complete support for the operation mode “report”
of the tool “coccicheck”, I would eventually expect that another SmPL rule
will provide a helpful message instead of immediately exiting after
the script variable “ns” was defined.
Are you going to take any additional software design options better
into account?

Regards,
Markus

2019-10-06 06:47:28

by Julia Lawall

[permalink] [raw]
Subject: Re: [PATCH] scripts: add_namespace: Fix coccicheck failed



On Sun, 6 Oct 2019, Markus Elfring wrote:

> > Now all scripts in scripts/coccinelle to be automatically called
> > by coccicheck. However new adding add_namespace.cocci does not
> > support report mode, which make coccicheck failed.
> > This add "virtual report" to make the coccicheck go ahead smoothly.
>
> I find that this change description needs improvements and corrections.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=43b815c6a8e7dbccb5b8bd9c4b099c24bc22d135#n151
>
> I would find a commit subject like “scripts: add_namespace:
> Add support for the default coccicheck operation mode” more appropriate
> (if this software development will be clarified further in the shown direction
> at all).

Please let this go. Please stop criticizing the English of others. The
message is understandable, and even more informative than what you
propose.

julia

>
>
> > Fixes: eb8305aecb95 ("scripts: Coccinelle script for namespace dependencies.")
>
> I got the impression that a sub-optimal solution approach would be chosen here.
> The automatic script execution is requested despite of the fact
> that the input parameter “name space” (SmPL identifier “virtual.ns”)
> will be required.
>
> I am curious under which circumstances an other transformation
> can become more attractive.
> [PATCH 0/2] Coccinelle: Extend directory hierarchy
> https://lore.kernel.org/cocci/[email protected]/
> https://lore.kernel.org/patchwork/project/lkml/list/?series=412494
> https://lkml.org/lkml/2019/10/2/60
>
>
> > +++ b/scripts/coccinelle/misc/add_namespace.cocci
> > @@ -6,6 +6,8 @@
> > /// add a missing namespace tag to a module source file.
> > ///
> >
> > +virtual report
> > +
> > @has_ns_import@
>
> If you would insist on the complete support for the operation mode “report”
> of the tool “coccicheck”, I would eventually expect that another SmPL rule
> will provide a helpful message instead of immediately exiting after
> the script variable “ns” was defined.
> Are you going to take any additional software design options better
> into account?
>
> Regards,
> Markus
>

2019-10-06 07:09:51

by Markus Elfring

[permalink] [raw]
Subject: Re: scripts: add_namespace: Fix coccicheck failed

>> I would find a commit subject like “scripts: add_namespace:
>> Add support for the default coccicheck operation mode” more appropriate
>> (if this software development will be clarified further in the shown direction
>> at all).
>
> Please let this go.

This will not happen for a while.


> Please stop criticizing the English of others.

I am occasionally trying to provide some code review.

Chances for further improvements will eventually be lost, if you do not
get informed about corresponding update candidates.


> The message is understandable, and even more informative than what you propose.

I would appreciate the selection of a better wording also in this case.

Regards,
Markus

2019-10-06 07:33:13

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [Cocci] [RFC] scripts: Fix coccicheck failed

On Sun, Oct 06, 2019 at 07:34:49AM +0200, Markus Elfring wrote:
> >> Would you like to increase your software development attention for
> >> efficient system configuration on this issue?
> >
> > No.
>
> Thanks for this information.
>
> I am still curious if other contributors will care more for this aspect.

No. Please stop.

greg k-h

2019-10-06 11:11:41

by Matthias Männich

[permalink] [raw]
Subject: Re: [PATCH] scripts: add_namespace: Fix coccicheck failed

Hi YueHaibing!

On Sun, Oct 06, 2019 at 12:44:56PM +0800, YueHaibing wrote:
>Now all scripts in scripts/coccinelle to be automatically called
>by coccicheck. However new adding add_namespace.cocci does not
>support report mode, which make coccicheck failed.
>This add "virtual report" to make the coccicheck go ahead smoothly.
>
>Fixes: eb8305aecb95 ("scripts: Coccinelle script for namespace dependencies.")
>Acked-by: Julia Lawall <[email protected]>
>Signed-off-by: YueHaibing <[email protected]>

Thanks for fixing this!

Acked-by: Matthias Maennich <[email protected]>

Cheers,
Matthias

>---
> scripts/coccinelle/misc/add_namespace.cocci | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/scripts/coccinelle/misc/add_namespace.cocci b/scripts/coccinelle/misc/add_namespace.cocci
>index c832bb6445a8..99e93a6c2e24 100644
>--- a/scripts/coccinelle/misc/add_namespace.cocci
>+++ b/scripts/coccinelle/misc/add_namespace.cocci
>@@ -6,6 +6,8 @@
> /// add a missing namespace tag to a module source file.
> ///
>
>+virtual report
>+
> @has_ns_import@
> declarer name MODULE_IMPORT_NS;
> identifier virtual.ns;
>--
>2.20.1
>
>

2019-10-07 13:18:36

by Jessica Yu

[permalink] [raw]
Subject: Re: [PATCH] scripts: add_namespace: Fix coccicheck failed

+++ YueHaibing [06/10/19 12:44 +0800]:
>Now all scripts in scripts/coccinelle to be automatically called
>by coccicheck. However new adding add_namespace.cocci does not
>support report mode, which make coccicheck failed.
>This add "virtual report" to make the coccicheck go ahead smoothly.
>
>Fixes: eb8305aecb95 ("scripts: Coccinelle script for namespace dependencies.")
>Acked-by: Julia Lawall <[email protected]>
>Signed-off-by: YueHaibing <[email protected]>

Thanks for the fix!

If there are no complaints, I'll queue this up in the modules tree for -rc3.

Jessica