[Cocci] Remove unnecessary null pointer checks?

SF Markus Elfring elfring at users.sourceforge.net
Sat Feb 22 09:09:27 CET 2014

> Not sure what you mean by extended.

I have tried the following search pattern.

identifier fun, x;
type t;
*fun(..., t* x, ...)
  if (!x) return;

Will your current tool version "1.0.0-rc20" find also the kfree() functions?

Should I add any variant of "unlikely(ZERO_OR_NULL_PTR(...))" to my filter
pattern eventually?

> If you want to propose Linux related fixes, you may want to look at the 
> kernel janitors mailing list.

Would it make sense to add the shown semantic patches to a specific script


More information about the Cocci mailing list