Re: [Intel-gfx] [PATCH] drm/i915: Avoid BIT(max) - 1 and use GENMASK(max, 0)

2017-02-07 Thread Joonas Lahtinen
On ti, 2017-02-07 at 14:03 +, Chris Wilson wrote: > On Tue, Feb 07, 2017 at 03:51:41PM +0200, Joonas Lahtinen wrote: > > > > "BIT(max) - 1" will overflow when max = 32, and GCC will complain. > > We already have GENMASK for generating the mask, use it! > > > > Signed-off-by: Joonas Lahtinen

Re: [Intel-gfx] [PATCH] drm/i915: Avoid BIT(max) - 1 and use GENMASK(max, 0)

2017-02-07 Thread Chris Wilson
On Tue, Feb 07, 2017 at 03:51:41PM +0200, Joonas Lahtinen wrote: > "BIT(max) - 1" will overflow when max = 32, and GCC will complain. > We already have GENMASK for generating the mask, use it! > > Signed-off-by: Joonas Lahtinen > Cc: Chris Wilson > --- > drivers/gpu/drm/i915/intel_device_info.c

[Intel-gfx] [PATCH] drm/i915: Avoid BIT(max) - 1 and use GENMASK(max, 0)

2017-02-07 Thread Joonas Lahtinen
"BIT(max) - 1" will overflow when max = 32, and GCC will complain. We already have GENMASK for generating the mask, use it! Signed-off-by: Joonas Lahtinen Cc: Chris Wilson --- drivers/gpu/drm/i915/intel_device_info.c | 2 +- drivers/gpu/drm/i915/intel_fbdev.c | 2 +- drivers/gpu/drm/i915/