public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* spatch for trivial pointer comparison style?
@ 2014-11-13 19:55 Joe Perches
  2014-11-14  6:06 ` [Cocci] " Julia Lawall
  0 siblings, 1 reply; 8+ messages in thread
From: Joe Perches @ 2014-11-13 19:55 UTC (permalink / raw)
  To: cocci; +Cc: LKML

I added a checkpatch entry for this.
Maybe some cocci test like this would be useful?

@@
type t;
t *p;
@@
-	p == NULL
+	!p

@@
type t;
t *p;
@@
-	p != NULL
+	p

@@
type t;
t *p;
@@
-	NULL == p
+	!p

@@
type t;
t *p;
@@
-	NULL != p
+	p



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-11-15  6:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-13 19:55 spatch for trivial pointer comparison style? Joe Perches
2014-11-14  6:06 ` [Cocci] " Julia Lawall
2014-11-14  6:12   ` Joe Perches
2014-11-14  9:18     ` Julia Lawall
2014-11-14 16:22       ` Joe Perches
2014-11-15  6:11         ` Julia Lawall
2014-11-14 10:08   ` SF Markus Elfring
2014-11-14 10:31     ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox