[PATCH i-g-t 12/16] tests/kms_atomic_transition: use for_each_output()

Jani Nikula
2026-04-14T07:16:52Z

Use for_each_output() instead of manually iterating display->outputs[i].

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
tests/kms_atomic_transition.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 5ae8da3c0cb4..431508a83853 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -835,10 +835,10 @@ static void commit_display(data_t *data, unsigned event_mask, bool nonblocking)

static void unset_output_pipe(igt_display_t *display)
{
- int i;
+ igt_output_t *output;

- for (i = 0; i < display->n_outputs; i++)
- igt_output_set_crtc(&display->outputs[i], NULL);
+ for_each_output(display, output)
+ igt_output_set_crtc(output, NULL);
}

static unsigned set_combinations(data_t *data, unsigned mask, struct igt_fb *fb)
--
2.47.3