public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Michal Wajdeczko" <michal.wajdeczko@intel.com>
To: igt-dev@lists.freedesktop.org,
	Lukasz Kalamarz <lukasz.kalamarz@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t v2 2/2] lib/intel_chipset: Move BIT macro to common place
Date: Thu, 04 Jul 2019 17:17:43 +0200	[thread overview]
Message-ID: <op.z4esrtxqxaggs7@mwajdecz-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20190703134303.328-2-lukasz.kalamarz@intel.com>

On Wed, 03 Jul 2019 15:43:03 +0200, Lukasz Kalamarz  
<lukasz.kalamarz@intel.com> wrote:

> This macro is defined in two tests. We can move it to common place
> in ioctl_wrappers, which is included by all tests.
> v2: Missed intel_device_info lib. Moved BIT definition to
> intel_chipset, which is part of igt.h
>
> Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz@intel.com>
> Cc: Katarzyna Dec <katarzyna.dec@intel.com>
> Cc: Michal Winiarski <michal.winiarski@intel.com>
> ---
>  lib/intel_chipset.h            | 2 ++
>  lib/intel_device_info.c        | 2 --
>  tests/i915/gem_ctx_isolation.c | 1 -
>  tests/i915/gem_ctx_param.c     | 2 --
>  4 files changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/lib/intel_chipset.h b/lib/intel_chipset.h
> index 7fc9bd77..74a40a46 100644
> --- a/lib/intel_chipset.h
> +++ b/lib/intel_chipset.h
> @@ -31,6 +31,8 @@
>  #include <pciaccess.h>
>  #include <stdbool.h>
> +#define BIT(x) (1ul <<(x))
> +

instead of polluting innocent header file and introduce new
dependency on "intel_chipset.h" to use BIT macro, maybe better
option would be to create new header for such utilities and then:

	#include "igt_utils.h"
or
	#include "igt_bitops.h"

in intel_device_info.c and igt.h.

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

  parent reply	other threads:[~2019-07-04 15:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03 13:43 [igt-dev] [PATCH i-g-t v2 1/2] tools/intel_dump_audion: Rename BIT macros to REG_BIT Lukasz Kalamarz
2019-07-03 13:43 ` [igt-dev] [PATCH i-g-t v2 2/2] lib/intel_chipset: Move BIT macro to common place Lukasz Kalamarz
2019-07-04  6:07   ` Katarzyna Dec
2019-07-04 15:17   ` Michal Wajdeczko [this message]
2019-07-03 14:20 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v2,1/2] tools/intel_dump_audion: Rename BIT macros to REG_BIT Patchwork
2019-07-04  6:07 ` [igt-dev] [PATCH i-g-t v2 1/2] " Katarzyna Dec
2019-07-04 12:59 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,v2,1/2] " 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=op.z4esrtxqxaggs7@mwajdecz-mobl1.ger.corp.intel.com \
    --to=michal.wajdeczko@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=lukasz.kalamarz@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