From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@inria.fr>
Cc: Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] Checking the replacement of two specific function calls
Date: Wed, 17 Jun 2020 20:20:23 +0200 [thread overview]
Message-ID: <7f9a55c2-46db-b36f-6145-2524be4c68c9@web.de> (raw)
In-Reply-To: <alpine.DEB.2.21.2004161444300.8125@hadrien>
>>>> elfring@Sonne:~/Projekte/Linux/next-patched> spatch --include-headers-for-types ~/Projekte/Coccinelle/janitor/use_devm_platform_get_and_ioremap_resource3.cocci drivers/i2c/busses/i2c-rcar.c
>>>
>>> No, include headers for types doesn't have any impact on how many header
>>> files are included. You need options like --all-includes or
>>> --recursive-includes.
>>
>> I still observe that the known patch hunk is not generated even with the addition
>> of one of these command options.
>> https://lore.kernel.org/patchwork/patch/1223734/
>> https://lore.kernel.org/linux-i2c/20200414134827.18674-1-zhengdejin5@gmail.com/
>>
>> Would I need any extra parameters here?
>
> Perhaps -I options to help it find the relevant .h file.
I became curious if the software situation can be clarified better.
Thus I have tested my transformation approach again with the commit
“i2c: altera: use proper variable to hold errno” before the referenced change.
@replacement@
expression base, device, resource;
@@
-resource = platform_get_resource(device, IORESOURCE_MEM, 0);
base =
- devm_ioremap_resource(&device->dev, resource)
+ devm_platform_get_and_ioremap_resource(device, 0, &resource)
;
elfring@Sonne:~/Projekte/Linux/next-patched> git checkout edb2c9dd3948738ef030c32b948543e84f4d3f81 && LANG=C make MODE=patch COCCI=~/Projekte/Coccinelle/janitor/use_devm_platform_get_and_ioremap_resource3.cocci M=drivers/i2c/busses V=1 coccicheck
Running (4 in parallel): /usr/local/bin/spatch -D patch --very-quiet --cocci-file /home/elfring/Projekte/Coccinelle/janitor/use_devm_platform_get_and_ioremap_resource3.cocci --patch . --dir drivers/i2c/busses -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 4 --chunksize 1
coccicheck failed
make: *** [Makefile:1781: coccicheck] Error 255
I can try another customised command out with the shown parameters.
elfring@Sonne:~/Projekte/Linux/next-patched> spatch -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 ~/Projekte/Coccinelle/janitor/use_devm_platform_get_and_ioremap_resource3.cocci drivers/i2c/busses/i2c-rcar.c
init_defs_builtins: /usr/local/bin/../lib/coccinelle/standard.h
HANDLING: drivers/i2c/busses/i2c-rcar.c
May I expect the generation of a patch by the Coccinelle software here?
Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
next prev parent reply other threads:[~2020-06-17 18:29 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-15 15:21 [Cocci] Checking the replacement of two specific function calls Markus Elfring
2020-04-15 17:52 ` Julia Lawall
2020-04-15 18:22 ` Markus Elfring
2020-04-16 7:12 ` Markus Elfring
2020-04-16 8:53 ` Julia Lawall
2020-04-16 9:11 ` Markus Elfring
2020-04-16 12:45 ` Julia Lawall
2020-04-16 14:15 ` Markus Elfring
2020-04-16 14:28 ` Julia Lawall
2020-04-17 6:08 ` Markus Elfring
2020-04-17 14:51 ` Markus Elfring
2020-04-17 18:56 ` Markus Elfring
2020-04-20 6:30 ` Markus Elfring
2020-04-16 14:30 ` Markus Elfring
2020-06-17 18:20 ` Markus Elfring [this message]
2020-04-16 12:26 ` Markus Elfring
2020-09-07 11:43 ` [Cocci] [PATCH] Coccinelle: api: Add SmPL script “use_devm_platform_get_and_ioremap_resource.cocci” Markus Elfring
2020-09-07 12:00 ` Julia Lawall
2020-09-07 13:05 ` Markus Elfring
2020-09-07 13:11 ` Julia Lawall
[not found] ` <46d314d5-822e-3d73-2d70-015794556e56@web.de>
2020-09-07 13:46 ` Julia Lawall
[not found] ` <8aaa799f-0ec4-cfd0-854a-e1006d0d200a@web.de>
2020-09-07 14:18 ` Julia Lawall
2020-09-07 16:54 ` [Cocci] [PATCH v2] " Markus Elfring
2020-09-07 17:03 ` Julia Lawall
[not found] ` <8fb7782c-538b-b657-af13-da71124e6afa@web.de>
2020-09-07 17:31 ` Julia Lawall
[not found] ` <01ea8faa-6fca-a91e-2b5d-378262dcc671@web.de>
2023-01-06 13:04 ` [cocci] [PATCH v3] " Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7f9a55c2-46db-b36f-6145-2524be4c68c9@web.de \
--to=markus.elfring@web.de \
--cc=cocci@systeme.lip6.fr \
--cc=julia.lawall@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).