1

Is it possible to use coccinelle out of a kernel tree using the kernel rules in scripts/coccinelle/ something like:

hedin@home:~/projects/linux/eudyptula$ spatch --sp-file /home/hedin /projects/open-source/linux/scripts/coccinelle/api/pm_runtime.cocci task08/task_08.c -o /tmp/new.c
init_defs_builtins: /usr/lib/coccinelle/standard.h
Fatal error: exception Failure("False should not be in the final result.
Perhaps your rule doesn't contain any +/-/* code, or you have a failed dependency. 
If the problem is not clear, try the option --debug-parse-cocci.")

?

Braiam
  • 1
  • 11
  • 47
  • 78
Roman Storozhenko
  • 369
  • 1
  • 3
  • 16

1 Answers1

0

The short answer is yes.

spatch --sp-file path/to/coccipatch.cocci path/to/file.c > output.patch

You have a space after "hedin" which may be part of the problem. You can find other examples here and here, including how to call coccinelle:

Daiwen
  • 727
  • 1
  • 4
  • 15