From: Dave Gordon Date: Tue, 9 Aug 2016 17:35:10 +0000 (+0100) Subject: drm: avoid "possible bad bitmask?" warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aac440ff22a27155ae08f4d0fd6ac2971bfc5f3d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm: avoid "possible bad bitmask?" warning Recent versions of gcc say this: include/drm/i915_drm.h:96:34: warning: result of β€˜65535 << 20’ requires 37 bits to represent, but β€˜int’ only has 32 bits [-Wshift-overflow=] Reported-by: David Binderman Signed-off-by: Dave Gordon Cc: Dave Airlie Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1470764110-23855-1-git-send-email-david.s.gordon@intel.com --- diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h index b1755f8db36b..4e1b274e1164 100644 --- a/include/drm/i915_drm.h +++ b/include/drm/i915_drm.h @@ -93,6 +93,6 @@ extern bool i915_gpu_turbo_disable(void); #define I845_TSEG_SIZE_1M (3 << 1) #define INTEL_BSM 0x5c -#define INTEL_BSM_MASK (0xFFFF << 20) +#define INTEL_BSM_MASK (-(1u << 20)) #endif /* _I915_DRM_H_ */