[i-g-t 1/3] lib: Add u32 variants of igt_assert_{lt,lte}
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Thu Aug 1 06:26:00 UTC 2024
From: Matt Roper <matthew.d.roper at intel.com>
igt.cocci assumes that u32 variants of the comparison assertions exist,
so add the two that were missing.
Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
---
lib/igt_core.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/lib/igt_core.h b/lib/igt_core.h
index 084d94da7..82f474c5f 100644
--- a/lib/igt_core.h
+++ b/lib/igt_core.h
@@ -915,6 +915,15 @@ void igt_describe_f(const char *fmt, ...);
*/
#define igt_assert_lte(n1, n2) igt_assert_cmpint(n1, <=, >, n2)
+/**
+ * igt_assert_lte_u32:
+ * @n1: first integer
+ * @n2: second integer
+ *
+ * Like igt_assert_lte(), but for uint32_t.
+ */
+#define igt_assert_lte_u32(n1, n2) igt_assert_cmpuint(n1, <=, >, n2)
+
/**
* igt_assert_lte_u64:
* @n1: first integer
@@ -954,6 +963,15 @@ void igt_describe_f(const char *fmt, ...);
*/
#define igt_assert_lt(n1, n2) igt_assert_cmpint(n1, <, >=, n2)
+/**
+ * igt_assert_lt_u32:
+ * @n1: first integer
+ * @n2: second integer
+ *
+ * Like igt_assert_lt(), but for uint32_t.
+ */
+#define igt_assert_lt_u32(n1, n2) igt_assert_cmpuint(n1, <, >=, n2)
+
/**
* igt_assert_lt_u64:
* @n1: first integer
--
2.43.2
More information about the igt-dev
mailing list