summaryrefslogtreecommitdiff
path: root/tests/kms_flip.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2014-12-03 14:51:16 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2014-12-08 19:26:39 +0200
commit8032f526ef1d075e303342b7741db35faadfd00f (patch)
tree95ddfbf5e2cf7d471e48d8616ca64550400abeac /tests/kms_flip.c
parente1bdab9973ffdb5477666a384b011fa012965758 (diff)
tests: Run lib/igt.cocci
Found some open coded min()/max()/swap() macros. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tests/kms_flip.c')
-rw-r--r--tests/kms_flip.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 041f46a6..e579ce0e 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -165,7 +165,7 @@ static unsigned long gettime_us(void)
static void emit_dummy_load__bcs(struct test_output *o)
{
int i, limit;
- drm_intel_bo *dummy_bo, *target_bo, *tmp_bo;
+ drm_intel_bo *dummy_bo, *target_bo;
struct igt_fb *fb_info = &o->fb_info[o->current_fb_id];
unsigned pitch = fb_info->stride;
@@ -197,9 +197,7 @@ static void emit_dummy_load__bcs(struct test_output *o)
ADVANCE_BATCH();
}
- tmp_bo = dummy_bo;
- dummy_bo = target_bo;
- target_bo = tmp_bo;
+ swap(dummy_bo, target_bo);
}
intel_batchbuffer_flush(batch);
@@ -282,16 +280,12 @@ static void emit_dummy_load__rcs(struct test_output *o)
dst = &sb[1];
for (i = 0; i < limit; i++) {
- struct igt_buf *tmp;
-
copyfunc(batch, NULL,
src, 0, 0,
o->fb_width, o->fb_height,
dst, 0, 0);
- tmp = src;
- src = dst;
- dst = tmp;
+ swap(src, dst);
}
intel_batchbuffer_flush(batch);