linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] drop unneeded goto
@ 2015-05-28 21:02 Julia Lawall
  2015-05-28 21:02 ` [PATCH 5/9] wl1251: " Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2015-05-28 21:02 UTC (permalink / raw)
  To: devel
  Cc: kernel-janitors, HPDD-discuss, linux-rdma, netdev, linux-kernel,
	linux-media, linux-nfs, linux-wireless

These patches drop gotos that jump to a label that is at the next
instruction, in the case that the label is not used elsewhere in the
function.  The complete semantic patch that performs this transformation is
as follows:

// <smpl>
@r@
position p;
identifier l;
@@

if (...) goto l@p;
l:

@script:ocaml s@
p << r.p;
nm;
@@

nm := (List.hd p).current_element

@ok exists@
identifier s.nm,l;
position p != r.p;
@@

nm(...) {
<+... goto l@p; ...+>
}

@depends on !ok@
identifier s.nm;
position r.p;
identifier l;
@@

nm(...) {
<...
- if(...) goto l@p; l:
...>
}
// </smpl>


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

end of thread, other threads:[~2015-06-08  8:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-28 21:02 [PATCH 0/9] drop unneeded goto Julia Lawall
2015-05-28 21:02 ` [PATCH 5/9] wl1251: " Julia Lawall
2015-06-08  8:39   ` [5/9] " Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).