Re: [PATCH] drm/i915: prefer INTEL_GEN(dev_priv) to INTEL_INFO(dev)->gen

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14/09/16 13:32, Dave Gordon wrote:
On 13/09/16 10:10, Jani Nikula wrote:
On Sat, 10 Sep 2016, Dave Gordon <david.s.gordon@xxxxxxxxx> 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.

I should have pointed out that the full series is not part of this thread, it's a separate patchset beginning with

[PATCH 0/3] drm/i915: use INTEL_GEN(dev_priv) wherever possible​

https://lists.freedesktop.org/archives/intel-gfx/2016-September/106338.html

.Dave.

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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux