public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] lib/ioctl_wrappers: Move BIT macro to common place
Date: Wed,  3 Jul 2019 13:11:18 +0200	[thread overview]
Message-ID: <20190703111118.17472-1-lukasz.kalamarz@intel.com> (raw)

This macro is defined in two tests. We can move it to common place
in ioctl_wrappers, which is included by all tests.

Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
---
 lib/ioctl_wrappers.h           | 2 ++
 tests/i915/gem_ctx_isolation.c | 1 -
 tests/i915/gem_ctx_param.c     | 2 --
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h
index 03211c97..cb250488 100644
--- a/lib/ioctl_wrappers.h
+++ b/lib/ioctl_wrappers.h
@@ -39,6 +39,8 @@
 #include "i915/gem_context.h"
 #include "i915/gem_scheduler.h"
 
+#define BIT(x) (1ul << (x))
+
 /**
  * igt_ioctl:
  * @fd: file descriptor
diff --git a/tests/i915/gem_ctx_isolation.c b/tests/i915/gem_ctx_isolation.c
index 5b054c81..c4302394 100644
--- a/tests/i915/gem_ctx_isolation.c
+++ b/tests/i915/gem_ctx_isolation.c
@@ -33,7 +33,6 @@
 #define DIRTY2 0x2
 #define RESET 0x4
 
-#define BIT(x) (1ul << (x))
 #define ENGINE(x, y) BIT(4*(x) + (y))
 
 enum {
diff --git a/tests/i915/gem_ctx_param.c b/tests/i915/gem_ctx_param.c
index fa0ab520..bd1ee399 100644
--- a/tests/i915/gem_ctx_param.c
+++ b/tests/i915/gem_ctx_param.c
@@ -32,8 +32,6 @@
 
 IGT_TEST_DESCRIPTION("Basic test for context set/get param input validation.");
 
-#define BIT(x) (1ul << (x))
-
 #define NEW_CTX	BIT(0)
 #define USER BIT(1)
 
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2019-07-03 11:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03 11:11 Lukasz Kalamarz [this message]
2019-07-03 12:52 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/ioctl_wrappers: Move BIT macro to common place Patchwork
2019-07-04  9:33 ` [igt-dev] ✓ 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=20190703111118.17472-1-lukasz.kalamarz@intel.com \
    --to=lukasz.kalamarz@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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