On 10/02/2015 23:04, Eduardo Habkost wrote: > $ spatch --sp-file /tmp/error_report.spatch $(git grep -l error_report) > > /tmp/error_report.patch
Does it work without specifying any include path? I tried this a while ago: @@ identifier s, fld; @@ struct s { ... - QEMUTimer *fld; + QEMUTimer fld; ... } @@ expression E; identifier fld; @@ - E->fld = timer_new_ms( + timer_init_ms(&E->fld, ... ); (The patch is incomplete, but shows the problem). "spatch --sp-file timer.cocci hw/arm/pxa2xx.c" misses the first replacement for struct PXA2xxRTCState, but "spatch --sp-file timer.cocci hmp.c" does it right in struct MigrationStatus. Paolo