Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1457658

include/drm/i915_drm.h:96: possible bad bitmask ?

From David Binderman <linuxdev.baldrick@gmail.com>
Newsgroups linux.kernel
Subject include/drm/i915_drm.h:96: possible bad bitmask ?
Date 2016-08-08 11:40 +0200
Message-ID <s3Pcl-82a-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hello there,

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=]

Source code is

#define   INTEL_BSM_MASK (0xFFFF << 20)

Maybe something like

#define   INTEL_BSM_MASK (0xFFFFUL<< 20)

might be better.


Regards

David Binderman

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

include/drm/i915_drm.h:96: possible bad bitmask ? David Binderman <linuxdev.baldrick@gmail.com> - 2016-08-08 11:40 +0200
  Re: [Intel-gfx] include/drm/i915_drm.h:96: possible bad bitmask ? Daniel Vetter <daniel@ffwll.ch> - 2016-08-08 11:50 +0200
    Re: [Intel-gfx] include/drm/i915_drm.h:96: possible bad bitmask ? Dave Airlie <airlied@gmail.com> - 2016-08-09 05:00 +0200
      Re: [Intel-gfx] include/drm/i915_drm.h:96: possible bad bitmask ? Dave Gordon <david.s.gordon@intel.com> - 2016-08-09 18:10 +0200

csiph-web