> Just wrapping the assignment into the macro call turned out to be easy.

This feedback seems to be promising.


> But I haven't found a way to remove the now #ifdef :(

I get the following test result for a corresponding SmPL transformation 
approach.

@replacement@
identifier value;
@@
-#ifdef CONFIG_OF
 .of_match_table =
-                  value
+                  of_match_ptr(value)
 ,
-#endif /* CONFIG_OF */


elfring@Sonne:~/Projekte/Linux/next-patched> spatch 
~/Projekte/Coccinelle/Probe/Weigelt1.cocci sound/soc/codecs/pcm3060-i2c.c
init_defs_builtins: /usr/local/bin/../lib/coccinelle/standard.h
File "/home/elfring/Projekte/Coccinelle/Probe/Weigelt1.cocci", line 4, column 
1, charpos = 36
  around = '#ifdef CONFIG_OF',
  whole content = -#ifdef CONFIG_OF


> Any idea how I could solve this ?

How are the chances for contribution of additional software development 
resources
according to the information “Support for matching #ifdef, etc.”?
https://github.com/coccinelle/coccinelle/blob/19ee1697bf152d37a78a20cefe148775bf4b0e0d/changes.txt#upcomingplannedtodo

Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to