Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Matt Roper <matthew.d.roper@intel.com>,
	Kamil Konieczny <kamil.konieczny@linux.intel.com>
Subject: [i-g-t 1/3] lib: Add u32 variants of igt_assert_{lt,lte}
Date: Thu,  1 Aug 2024 11:56:00 +0530	[thread overview]
Message-ID: <20240801062602.2047179-2-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20240801062602.2047179-1-bhanuprakash.modem@intel.com>

From: Matt Roper <matthew.d.roper@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@intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny@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


  reply	other threads:[~2024-08-01  6:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-01  6:25 [i-g-t 0/3] Apply igt.cocci transforms Bhanuprakash Modem
2024-08-01  6:26 ` Bhanuprakash Modem [this message]
2024-08-01  6:26 ` [i-g-t 2/3] tests/intel: " Bhanuprakash Modem
2024-08-01  6:26 ` [i-g-t 3/3] tests/kms: " Bhanuprakash Modem
2024-08-01  8:07 ` ✓ CI.xeBAT: success for " Patchwork
2024-08-01  8:18 ` ✓ Fi.CI.BAT: " Patchwork
2024-08-01  9:27 ` ✗ CI.xeFULL: failure " Patchwork
2024-08-02  4:07 ` ✗ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240801062602.2047179-2-bhanuprakash.modem@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=matthew.d.roper@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox