public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Dave Gordon <david.s.gordon@intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	Chris Wilson <chris@chris-wilson.co.uk>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen
Date: Wed, 14 Sep 2016 13:32:12 +0100	[thread overview]
Message-ID: <545a2fe6-65aa-1e00-8f8d-75d54bb71365@intel.com> (raw)
In-Reply-To: <87vay0tbaf.fsf@intel.com>

On 13/09/16 10:10, Jani Nikula wrote:
> On Sat, 10 Sep 2016, Dave Gordon <david.s.gordon@intel.com> wrote:
>> Thanks, the other things I was thinking of fixing in the remaining files
>> were generally things like
>>
>>    if (INTEL_INFO(dev)->gen < 5 || IS_G33(dev))
>
> Is that a real or a made up example? IS_G33() would be redundant. But
> I'd like to see the semantic patch to fix that! ;)
>
> BR,
> Jani.

That particular one was made up. The full series is now on the list in 
three patches. Part 1 is this one and already has Chris' R-b, part 2 is 
all the nontrivial ones such as the above and part 3 is intel_display.c 
all on its own 'cos it's the biggest file and the biggest user of this 
construct. Both of the latter have various boolean combinations of 
INTEL_GEN() with IS_X() or HAS_X() so it might be worth checking them 
for redundancies.

If you make up a table of redundant comparisons I'm sure it can be 
turned into a Cocci script :)

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

  reply	other threads:[~2016-09-14 12:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-09 21:37 [PATCH] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen Dave Gordon
2016-09-09 21:58 ` Chris Wilson
2016-09-09 22:43   ` Dave Gordon
2016-09-13  9:10     ` Jani Nikula
2016-09-14 12:32       ` Dave Gordon [this message]
2016-09-14 12:37         ` Dave Gordon
  -- strict thread matches above, loose matches on Subject: below --
2016-06-10 17:35 Dave Gordon
2016-06-13  9:28 ` Tvrtko Ursulin
2016-06-13 14:59   ` Dave Gordon

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=545a2fe6-65aa-1e00-8f8d-75d54bb71365@intel.com \
    --to=david.s.gordon@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.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