[Intel-gfx] drivers/gpu/drm/i915/i915_reg.h:90:shift-overflow problem ?
David Binderman
linuxdev.baldrick at gmail.com
Mon May 30 10:32:59 UTC 2016
Hello there,
drivers/gpu/drm/i915/i915_reg.h:90:28: warning: result of β65535 <<
20β requires 37 bits to represent, but βintβ only has 32 bits
[-Wshift-overflow=]
Source code is
#define BSM_MASK (0xFFFF << 20)
Maybe better code
#define BSM_MASK (((unsigned long) 0xFFFF) << 20)
Regards
David Binderman
More information about the Intel-gfx
mailing list