[PATCH i-g-t] tests/kms_async_flips: Fix mixed declaration warning

Santhosh Reddy Guddati santhosh.reddy.guddati at intel.com
Fri Jun 27 04:05:19 UTC 2025


- Move struct format_mod declaration to the top of skip_async_format_mod
- No functional change; fixes build warning caused by below commit.

Fixes: aa4b2e0b81d2 ("tests/kms_async_flips: Add test for all async format modifiers")

Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
---
 tests/kms_async_flips.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
index dc3a0f92a..ddac904ce 100644
--- a/tests/kms_async_flips.c
+++ b/tests/kms_async_flips.c
@@ -860,6 +860,12 @@ static bool skip_async_format_mod(data_t *data,
 			    uint32_t format, uint64_t modifier,
 			    struct igt_vec *tested_formats)
 {
+	/* test each format "class" only once in non-extended tests */
+	struct format_mod rf = {
+		.format = igt_reduce_format(format),
+		.modifier = modifier,
+	};
+
 	/* igt doesn't know how to sw generate UBWC: */
 	if (is_msm_device(data->drm_fd) &&
 	    modifier == DRM_FORMAT_MOD_QCOM_COMPRESSED)
@@ -870,12 +876,6 @@ static bool skip_async_format_mod(data_t *data,
 	    igt_reduce_format(format) == DRM_FORMAT_XRGB2101010)
 		return true;
 
-	/* test each format "class" only once in non-extended tests */
-	struct format_mod rf = {
-		.format = igt_reduce_format(format),
-		.modifier = modifier,
-	};
-
 	if (igt_vec_index(tested_formats, &rf) >= 0)
 		return true;
 
-- 
2.34.1



More information about the igt-dev mailing list