This coccinelle script can check some violations for rule 5.7. It can identify things like: struct device *device But it is not capable to identify: struct test { ... } ... int test; Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>