From: Julia Lawall Date: Sat, 17 Oct 2009 06:43:17 +0000 (+0200) Subject: perf tools: Move dereference after NULL test X-Git-Tag: v2.6.33-rc1~399^2~146^2~14^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f39cdf25bf77219676ec5360980ac40b1a7e144a;p=pandora-kernel.git perf tools: Move dereference after NULL test In each case, if the NULL test on thread is needed, then the dereference should be after the NULL test. A simplified version of the semantic match that detects this problem is as follows (http://coccinelle.lip6.fr/): // @match exists@ expression x, E; identifier fld; @@ * x->fld ... when != \(x = E\|&x\) * x == NULL // Signed-off-by: Julia Lawall LKML-Reference: Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed