public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* drivers/gpu/drm/i915/i915_reg.h:90:shift-overflow problem ?
@ 2016-05-30 10:32 David Binderman
  2016-05-30 12:54 ` [PATCH] drm/i915: fix BSM_MASK definition Jani Nikula
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: David Binderman @ 2016-05-30 10:32 UTC (permalink / raw)
  To: daniel.vetter, jani.nikula, airlied, intel-gfx, dri-devel, dcb314

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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-05-31  9:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-30 10:32 drivers/gpu/drm/i915/i915_reg.h:90:shift-overflow problem ? David Binderman
2016-05-30 12:54 ` [PATCH] drm/i915: fix BSM_MASK definition Jani Nikula
2016-05-30 14:15 ` drivers/gpu/drm/i915/i915_reg.h:90:shift-overflow problem ? Chris Wilson
2016-05-30 14:51   ` Jani Nikula
2016-05-31  9:56 ` ✗ Ro.CI.BAT: failure for drm/i915: fix BSM_MASK definition Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox