From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: intel-gfx@lists.freedesktop.org, Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [RFC 2/3] drm/i915: Prefer IS_GEN<n> check with bitmask.
Date: Wed, 24 Oct 2018 18:15:01 +0300 [thread overview]
Message-ID: <20181024151501.GC9144@intel.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1810241553470.2371@hadrien>
On Wed, Oct 24, 2018 at 03:54:56PM +0100, Julia Lawall wrote:
> > I wish it would look something more like this:
> >
> > @@
> > identifier old =~ "^INTEL_GEN$";
> > expression exp;
> > constant gen;
> > fresh identifier new = "IS_GEN" ## gen;
> > @@
> > - old(exp) == gen
> > + new(exp)
> >
> > But coccinelle doesn't seem to accept the constant in the fresh
> > identifier thing.
>
> I think that the idea was to be sure that there would be no whitespace in
> the middle of the variable name. But a constant should indeed be fine. I
> can adjust that, in case it's useful in the future.
I think I had another similar case recently where I also wanted
a constant in there. Ah yes, now I remember. I was trying to
convert "n * 1024" to "SZ_nK" etc.
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-10-24 15:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-23 23:36 [RFC 1/3] drm/i915: Rename IS_GEN to IS_GEN_RANGE Rodrigo Vivi
2018-10-23 23:36 ` [RFC 2/3] drm/i915: Prefer IS_GEN<n> check with bitmask Rodrigo Vivi
2018-10-24 10:22 ` Ville Syrjälä
2018-10-24 14:54 ` Julia Lawall
2018-10-24 15:15 ` Ville Syrjälä [this message]
2018-10-24 23:41 ` Rodrigo Vivi
2018-10-25 10:59 ` Ville Syrjälä
2018-10-25 11:11 ` Julia Lawall
2018-10-26 19:40 ` Rodrigo Vivi
2018-10-26 19:47 ` Julia Lawall
2018-10-26 19:55 ` Rodrigo Vivi
2018-10-23 23:36 ` [RFC 3/3] drm/i915: Kill GEN_FOREVER Rodrigo Vivi
2018-10-24 12:31 ` Daniel Vetter
2018-10-23 23:50 ` ✗ Fi.CI.SPARSE: warning for series starting with [RFC,1/3] drm/i915: Rename IS_GEN to IS_GEN_RANGE Patchwork
2018-10-24 0:07 ` ✓ Fi.CI.BAT: success " Patchwork
2018-10-24 4:50 ` ✓ Fi.CI.IGT: " Patchwork
2018-10-29 10:19 ` [RFC 1/3] " Jani Nikula
2018-10-29 17:52 ` Rodrigo Vivi
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=20181024151501.GC9144@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=julia.lawall@lip6.fr \
--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.