]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: remove potentially confusing IS_G4X checks
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Mon, 20 Feb 2017 20:00:41 +0000 (17:00 -0300)
committerPaulo Zanoni <paulo.r.zanoni@intel.com>
Tue, 7 Mar 2017 17:58:47 +0000 (14:58 -0300)
commit5a1291bdae94ee7c58b8623cecdbf68f8f705b44
treeaa3133675bdeaebdfb566a1413cba41c2d3fafce
parent85d256dfa619f4bb22e146f684d7a79e8496b158
drm/i915: remove potentially confusing IS_G4X checks

The IS_G4X macro is defined as IS_G45 || IS_GM45. We have two points
in our code where we have an if statement checking for GM45 followed
by an else if statement checking for IS_G4X. This can be confusing
since the IS_G4X check won't be catching the previously-checked GM45.
Someone quickly trying to check which functions run on each platform
may end up getting confused while reading the code.

Fix the potential confusion by limiting the else if statements to only
check for the platform that was not already checked earlier in the if
ladder.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1487620842-22893-3-git-send-email-paulo.r.zanoni@intel.com
drivers/gpu/drm/i915/intel_cdclk.c