All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org,
	Lucas De Marchi <lucas.demarchi@intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 2/5] drm/i915: replace IS_GEN<N> with IS_GEN(..., N)
Date: Thu, 1 Nov 2018 15:27:56 +0200	[thread overview]
Message-ID: <20181101132756.GD9144@intel.com> (raw)
In-Reply-To: <87a7mtkpxo.fsf@intel.com>

On Thu, Nov 01, 2018 at 01:17:07PM +0200, Jani Nikula wrote:
> On Thu, 01 Nov 2018, Lucas De Marchi <lucas.demarchi@intel.com> wrote:
> > Now that IS_GEN can accept 1 or 2 parameters, replace the use
> > of IS_GEN<N> by passing N as argument. This was generated with:
> 
> Ignoring the naming and all the contentious stuff about using the same
> macro for ranges and single gen, I think there's a useful discussion to
> be had here about defining IS_GEN<N> macros for every new generation
> vs. passing the gen to a macro.
> 
> I do prefer one IS_GEN(i915, N) over N instances of IS_GEN<N>(i915).

#define _IS_GEN(n) \
static inline bool IS_GEN ## n (... i915) { return IS_GEN(i915, n); }

_IS_GEN(2)
_IS_GEN(3)
...

I guess that's not much better apart from making typos harder to make.

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-11-01 13:28 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-01  8:35 [PATCH 0/5] Make GEN macros more similar Lucas De Marchi
2018-11-01  8:35 ` [PATCH 1/5] drm/i915: let IS_GEN receive 1 or 2 arguments Lucas De Marchi
2018-11-01  8:35 ` [PATCH 2/5] drm/i915: replace IS_GEN<N> with IS_GEN(..., N) Lucas De Marchi
2018-11-01 11:17   ` Jani Nikula
2018-11-01 13:27     ` Ville Syrjälä [this message]
2018-11-01 11:35   ` Tvrtko Ursulin
2018-11-01 17:00     ` Lucas De Marchi
2018-11-01  8:35 ` [PATCH 3/5] drm/i915: merge gen checks to use range Lucas De Marchi
2018-11-01 11:18   ` Jani Nikula
2018-11-01 11:31   ` Tvrtko Ursulin
2018-11-02 18:10     ` Lucas De Marchi
2018-11-02 19:19       ` Rodrigo Vivi
2018-11-02 19:47         ` Lucas De Marchi
2018-11-02 22:12           ` Rodrigo Vivi
2018-11-02 22:28             ` Lucas De Marchi
2018-11-02 22:47               ` Rodrigo Vivi
2018-11-01  8:35 ` [PATCH 4/5] drm/i915: add helper IS_GEN_* macros Lucas De Marchi
2018-11-01 11:04   ` Tvrtko Ursulin
2018-11-01 11:29     ` Jani Nikula
2018-11-01  8:35 ` [PATCH 5/5] RFC: drm/i915: convert a few cases to the " Lucas De Marchi
2018-11-01  9:30 ` ✗ Fi.CI.CHECKPATCH: warning for Make GEN macros more similar Patchwork
2018-11-01  9:32 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-11-01  9:57 ` ✗ Fi.CI.BAT: failure " 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=20181101132756.GD9144@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=rodrigo.vivi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.