!IN_SET(..)
a != b && a != c && …
The included cocci was used to generate the changes. Thanks to @flo-wer for pointing this case out.