public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] delete unnecessary null test on array
@ 2014-08-06 10:39 Julia Lawall
  2014-08-06 10:39 ` [PATCH 1/1] dpt_i2o: " Julia Lawall
  0 siblings, 1 reply; 8+ messages in thread
From: Julia Lawall @ 2014-08-06 10:39 UTC (permalink / raw)
  To: linux-kernel
  Cc: kernel-janitors, linux-scsi, James E.J. Bottomley,
	Adaptec OEM Raid Solutions

Delete NULL test on array.  The complete semantic patch that finds this
problem is as follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
type T;
T [] e;
position p;
@@

(
 e ==@p NULL
|
 e !=@p NULL
|
 !@p e
)

@ disable fld_to_ptr@
expression e;
identifier f;
position r.p;
@@

(
* (e.f) ==@p NULL
|
* (e.f) !=@p NULL
|
* !@p(e.f)
)
// </smpl>

For best results, this semantic patch requires lots of type information,
and should be used with the options --recursive-includes and
--relax-include-path.  This may take a long time to run.


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

end of thread, other threads:[~2014-08-09  6:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-06 10:39 [PATCH 0/1] delete unnecessary null test on array Julia Lawall
2014-08-06 10:39 ` [PATCH 1/1] dpt_i2o: " Julia Lawall
2014-08-08 14:38   ` walter harms
2014-08-08 16:59   ` James Bottomley
2014-08-08 17:03     ` Julia Lawall
2014-08-08 17:14       ` James Bottomley
2014-08-08 17:16         ` Julia Lawall
2014-08-09  6:26         ` Julia Lawall

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