> But I have now lost track of what the semantic patch actually is,
> so I don't know what is the problem.
Do you find the following transformation approach easier to clarify?
SmPL script:
@replacement@
expression base, device, index, private;
@@
-private->res = platform_get_resource(device, IORESOURCE_MEM, index);
base =
- devm_ioremap_resource
+ devm_platform_get_and_ioremap_resource
(device,
+ index, &
private->res
);
Command example:
elfring@Sonne:~/Projekte/Coccinelle/janitor> spatch
use_devm_platform_get_and_ioremap_resource8.cocci
../Probe/i2c-rcar-excerpt-20200415.c
Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci