public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [RFC 2/3] drm/i915: Prefer IS_GEN<n> check with bitmask.
Date: Fri, 26 Oct 2018 21:47:05 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1810262146220.2791@hadrien> (raw)
In-Reply-To: <20181026194055.GI2232@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3574 bytes --]



On Fri, 26 Oct 2018, Rodrigo Vivi wrote:

> On Thu, Oct 25, 2018 at 12:11:57PM +0100, Julia Lawall wrote:
> >
> >
> > On Thu, 25 Oct 2018, Ville Syrjälä wrote:
> >
> > > On Wed, Oct 24, 2018 at 04:41:06PM -0700, Rodrigo Vivi wrote:
> > > > On Wed, Oct 24, 2018 at 01:22:57PM +0300, Ville Syrjälä wrote:
> > > > > On Tue, Oct 23, 2018 at 04:36:19PM -0700, Rodrigo Vivi wrote:
> > > > > > Whenever possible we should stick with IS_GEN<n> checks.
> > > > > >
> > > > > > Bitmaks has been introduced on commit ae7617f0ef18 ("drm/i915:
> > > > > > Allow optimized platform checks") for efficiency.
> > > > > >
> > > > > > Let's stick with it whenever possible.
> > > > > >
> > > > > > This patch was generated with coccinelle:
> > > > > >
> > > > > > spatch -sp_file is_gen.cocci *{c,h} --in-place
> > > > > >
> > > > > > is_gen.cocci:
> > > > > > @gen2@ expression e; @@
> > > > > > -INTEL_GEN(e) == 2
> > > > > > +IS_GEN2(e)
> > > > > > @gen3@ expression e; @@
> > > > > > -INTEL_GEN(e) == 3
> > > > > > +IS_GEN3(e)
> > > > > > @gen4@ expression e; @@
> > > > > > -INTEL_GEN(e) == 4
> > > > > > +IS_GEN4(e)
> > > > > > @gen5@ expression e; @@
> > > > > > -INTEL_GEN(e) == 5
> > > > > > +IS_GEN5(e)
> > > > > > @gen6@ expression e; @@
> > > > > > -INTEL_GEN(e) == 6
> > > > > > +IS_GEN6(e)
> > > > > > @gen7@ expression e; @@
> > > > > > -INTEL_GEN(e) == 7
> > > > > > +IS_GEN7(e)
> > > > > > @gen8@ expression e; @@
> > > > > > -INTEL_GEN(e) == 8
> > > > > > +IS_GEN8(e)
> > > > > > @gen9@ expression e; @@
> > > > > > -INTEL_GEN(e) == 9
> > > > > > +IS_GEN9(e)
> > > > > > @gen10@ expression e; @@
> > > > > > -INTEL_GEN(e) == 10
> > > > > > +IS_GEN10(e)
> > > > > > @gen11@ expression e; @@
> > > > > > -INTEL_GEN(e) == 11
> > > > > > +IS_GEN11(e)
> > > > >
> > > > > Slightly less repetitive version.
> > > >
> > > > Thanks. I'm supper newbie on coccinelle and it was
> > > > easier to duplicate then trying to learn all this new lang.
> > > >
> > > > But I really appreciate you sharing this. I'd like
> > > > to go with this so the better rule keeps on commit message.
> > > >
> > > > > Sadly not super neat on
> > > > > account of having to use the python stuff.
> > > >
> > > > however it seems python version didn't work so well here:
> > > >
> > > > init_defs_builtins: /usr/lib64/coccinelle/standard.h
> > > > Python error: No module named coccilib.elems
> > > >
> > > > do you have any idea about it?
> > >
> > > Never seen it. On gentoo it just works when I have the python
> > > use flag enabled.
> > >
> > > Maybe your distro doesn't include the python support in the
> > > build, or maybe some kind of python version issue?
> >
> > Thanks for the report.  I will have someone look into it.  It's an
> > internal Coccinelle thing.  Perhaps python is not enabled.  Do you have
> > the version of Coccinelle from github?
>
> I just tried with coccinelle from github but got same result.
>
> But with this commit before the bump to automake1.16:
>
> commit 4db95998768557c66d6e337be2253032b5d810bc (HEAD -> master)
> Author: Thierry Martinez <thierry.martinez@inria.fr>
> Date:   Wed Sep 12 14:43:41 2018 +0200
>
>     Compute depend by calling make recursilevy
>
>     The set of files in $(source_files) may change when the tarball is
>     unpacked.
>
> ----
>
> $ python --version
> Python 2.7.15
> $ python3 --version
> Python 3.6.6
>
> ----
>
> I believe I'm moving this patch with the repetitive bad
> rule for now that I'm sure it works in most of the distros.

Sorry, I'm not sure to understand the last sentence. Are things ok now, or
not?

thanks,
julia

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

  reply	other threads:[~2018-10-26 19:47 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ä
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 [this message]
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=alpine.DEB.2.21.1810262146220.2791@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=intel-gfx@lists.freedesktop.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox