drm/i915: Avoid BIT(max) - 1 and use GENMASK(max - 1, 0)
authorJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Wed, 8 Feb 2017 13:12:09 +0000 (15:12 +0200)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Wed, 8 Feb 2017 15:22:00 +0000 (17:22 +0200)
commit3c779a49bd7ce6c9ecc35a679f28f94fe3cfaeab
treea2db24065313d5907e5179baad66ab3ef5948d33
parent038c95a313e4ca954ee5ab8a0c7559a646b0f462
drm/i915: Avoid BIT(max) - 1 and use GENMASK(max - 1, 0)

"BIT(max) - 1" will overflow when max = 32, and GCC will complain.
We already have GENMASK for generating the mask, use it!

v2: Majestic off by one spotted (Chris)

Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/intel_device_info.c
drivers/gpu/drm/i915/intel_fbdev.c
drivers/gpu/drm/i915/intel_runtime_pm.c