From: Dave Gordon Date: Tue, 9 Aug 2016 17:35:10 +0000 (+0100) Subject: drm: avoid "possible bad bitmask?" warning X-Git-Tag: v4.9-rc1~41^2~36^2~129 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=aac440ff22a27155ae08f4d0fd6ac2971bfc5f3d;p=karo-tx-linux.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_ */