On Sun, 29 Jan 2023, Luca Coelho wrote: > On Sun, 2023-01-29 at 19:55 +0200, Luca Coelho wrote: > > On Sun, 2023-01-29 at 18:28 +0100, Julia Lawall wrote: > > > > After mangling a lot with the rules, I can see that this now works, > > > > but > > > > only if I select the vlv_dsi.c file alone, like this: > > > > > > > > spatch --sp-file ~/dev_priv_i915.spatch -I > > > > drivers/gpu/drm/i915/display \ > > > >  --all-includes --in-place ./drivers/gpu/drm/i915/display/vlv_dsi.c > > > > > > > > > > > > If I try to run the rules in all files in that directory, only the > > > > intel_display.c file is affected: > > > > > > > > spatch --sp-file ~/dev_priv_i915.spatch -I > > > > drivers/gpu/drm/i915/display \ > > > >  --all-includes --in-place ./drivers/gpu/drm/i915/display > > > > > > > > > > > > Of course, I can work around this by using find and running spatch > > > > individually in every file... But not ideal. > > > > > > OK, so perhaps the problem is not actually the rules, but rather the > > > way in which the header files are being collected. > > > > Yeah, after banging my head on the rules, I realized that the rules > > themselves were not really the issue. > > > > > > > What version of Coccinelle do you have? Someone (Kees?) reported a > > > problem with the collecion of header files at one point fairly > > > recently, and I think I fixed it. It should be available in the > > > github version of Coccinelle. > > > > This is what I have: > > > > luca@kveik:~/gfx/linux-drm-tip$ spatch --version > > spatch version 1.1.1 compiled with OCaml version 4.13.1 > > Flags passed to the configure script: --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --enable-ocaml --enable-python --with-python=python3 --enable-opt > > OCaml scripting support: yes > > Python scripting support: yes > > Syntax of regular expressions: PCRE > > > > It's the standard one from Debian testing. > > > > I'll try the github version. Thanks for pointing out! > > It seems to be working slightly better, but it's still not finding all > the occurrences that I find by calling spatch with all the files > individually... :( I tried the latest head from github, > 87350d742df39d847b15af39865329c2fe23460d. Could you give a specific case that idn't found? thanks, julia > > -- > Cheers, > Luca. >