Skip to contentSkip to conversation

can't match a simple line?

Cocci Wolfram Sang 3 participants 3 messages Oct 9, 2014

lore
Share & tools
lore
#0 lore raw

Hi,

this is so simple yet I don't see what I do wrong?

$ spatch --version
spatch version 1.0.0-rc22 with Python support and with PCRE support

(from Debian but same with rc21):

The rule 'test.cocci':

@@
@@
- module_platform_driver(...);

The command line:

spatch -sp_file test.cocci drivers/i2c/muxes/

No removals?

init_defs_builtins: /usr/share/coccinelle/standard.h
HANDLING: drivers/i2c/muxes/i2c-arb-gpio-challenge.c (ONCE) Expected tokens module_platform_driver Skipping:drivers/i2c/muxes/i2c-mux-pca954x.c
HANDLING: drivers/i2c/muxes/i2c-mux-pinctrl.c
HANDLING: drivers/i2c/muxes/i2c-mux-gpio.c Skipping:drivers/i2c/muxes/built-in.mod.c Skipping:drivers/i2c/muxes/i2c-mux-pca9541.c

It should match, or?

Confused,

Wolfram

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://systeme.lip6.fr/pipermail/cocci/attachments/20141009/223d23de/attachment.asc>

#1 lore raw
Quoted 28 lines · Wolfram Sang

Hi,

this is so simple yet I don't see what I do wrong?

$ spatch --version spatch version 1.0.0-rc22 with Python support
and with PCRE support

(from Debian but same with rc21):

The rule 'test.cocci':

@@ @@ - module_platform_driver(...);

The command line:

spatch -sp_file test.cocci drivers/i2c/muxes/

No removals?

init_defs_builtins: /usr/share/coccinelle/standard.h HANDLING:
drivers/i2c/muxes/i2c-arb-gpio-challenge.c (ONCE) Expected tokens module_platform_driver Skipping:drivers/i2c/muxes/i2c-mux-pca954x.c HANDLING:
drivers/i2c/muxes/i2c-mux-pinctrl.c HANDLING:
drivers/i2c/muxes/i2c-mux-gpio.c Skipping:drivers/i2c/muxes/built-in.mod.c Skipping:drivers/i2c/muxes/i2c-mux-pca9541.c

Quoted 1 line

It should match, or?

Only if it can parse the blocks containing that code. What is spatch --parse-c saying for the affected files?

bye
michael

#2 lore raw
Quoted 5 lines · Michael Stefaniuc
Quoted 4 lines · Wolfram Sang

Hi,

this is so simple yet I don't see what I do wrong?

Quoted 8 lines
Quoted 8 lines
$ spatch --version spatch version 1.0.0-rc22 with Python support
and with PCRE support

(from Debian but same with rc21):

The rule 'test.cocci':

@@ @@ - module_platform_driver(...);

Is this a normal program statement, or is it something at top level. In the latter case, you would need a "metavariable" declaration

declarer name module_platform_driver;

julia

Quoted 27 lines
Quoted 16 lines

The command line:

spatch -sp_file test.cocci drivers/i2c/muxes/

No removals?

init_defs_builtins: /usr/share/coccinelle/standard.h HANDLING:
drivers/i2c/muxes/i2c-arb-gpio-challenge.c (ONCE) Expected tokens module_platform_driver Skipping:drivers/i2c/muxes/i2c-mux-pca954x.c HANDLING:
drivers/i2c/muxes/i2c-mux-pinctrl.c HANDLING:
drivers/i2c/muxes/i2c-mux-gpio.c Skipping:drivers/i2c/muxes/built-in.mod.c Skipping:drivers/i2c/muxes/i2c-mux-pca9541.c

Quoted 1 line

It should match, or?

Only if it can parse the blocks containing that code. What is spatch --parse-c saying for the affected files?

bye
michael
_______________________________________________
Cocci mailing list
Cocci at systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci