Damien dodged this ...
Also run the script while at it.
v2: Don't just capture identifiers for pipe, but also expressions.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
@@
-abort();
+igt_fail(1);
+
+@@
+iterator name for_each_pipe;
+igt_display_t *display;
+expression pipe;
+@@
+- for (pipe = 0; pipe < igt_display_get_n_pipes(display); pipe++) {
++ for_each_pipe (display, pipe) {
+...
+}
for_each_connected_output(display, output) {
data->output = output;
- for (p = 0; p < igt_display_get_n_pipes(display); p++) {
+ for_each_pipe(display, p) {
data->pipe = p;
if (!prepare_crtc(data, output, cursor_w, cursor_h))
reset_display(data);
for_each_connected_output(display, data->output) {
- for (data->pipe = 0; data->pipe < igt_display_get_n_pipes(display); data->pipe++) {
+ for_each_pipe(display, data->pipe) {
if (!prepare_crtc(data))
continue;
enum pipe p;
for_each_connected_output(display, output) {
- for (p = 0; p < igt_display_get_n_pipes(display); p++) {
+ for_each_pipe(display, p) {
if (run_single_test(data, p, output))
return; /* one time ought to be enough */
}