[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPM=9twf3k8KD4vcQAF67o27_yMJr1SVpiApA8WCvmVVM_vkGw@mail.gmail.com>
Date: Tue, 9 Aug 2016 12:59:33 +1000
From: Dave Airlie <airlied@...il.com>
To: David Binderman <linuxdev.baldrick@...il.com>,
"Vetter, Daniel" <daniel.vetter@...el.com>,
Jani Nikula <jani.nikula@...ux.intel.com>,
David Airlie <airlied@...ux.ie>, dcb314@...mail.com,
"intel-gfx@...ts.freedesktop.org" <intel-gfx@...ts.freedesktop.org>,
dri-devel <dri-devel@...ts.freedesktop.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [Intel-gfx] include/drm/i915_drm.h:96: possible bad bitmask ?
On 8 August 2016 at 19:40, Daniel Vetter <daniel@...ll.ch> wrote:
> On Mon, Aug 08, 2016 at 10:31:32AM +0100, David Binderman wrote:
>> 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.
>
> Yup. Care to bake this into a patch (with s-o-b and everything per
> Documentation/SubmittingPatches) so I can apply it?
Why would you want to apply a clearly incorrect patch :-)
INTEL_BSM_MASK is used in one place, on a 32-bit number
I'm not sure what it needs to be, but a 64-bit number it doesn't.
Dave.
Powered by blists - more mailing lists