drivers/gpu/drm/gma500/mdfld_intel_display.c:102:37: warning: bitwise comparison always evaluates to false [-Wtautological-compare]

David Binderman dcb314 at hotmail.com
Tue Oct 24 09:07:00 UTC 2017


Hello there,


Code I looked at is in linux-4.14-rc6, released 20171023, so reasonably

up to date.


I did a further check on github.com/torvalds/linux and the code

looks wrong there, too.


So I don't see the fix you mentioned in either of the places I looked.


Regards


David Binderman

________________________________
From: Jani Nikula <jani.nikula at linux.intel.com>
Sent: 24 October 2017 08:54
To: David Binderman; patrik.r.jakobsson at gmail.com; airlied at linux.ie; dri-devel at lists.freedesktop.org; linux-kernel at vger.kernel.org
Subject: Re: drivers/gpu/drm/gma500/mdfld_intel_display.c:102:37: warning: bitwise comparison always evaluates to false [-Wtautological-compare]

On Mon, 23 Oct 2017, David Binderman <dcb314 at hotmail.com> wrote:
> Hello there,
>
> Source code is
>
>         if ((temp & PIPEACONF_PIPE_STATE) == 1)
>             break;
>
> but
>
> $ fgrep PIPEACONF_PIPE_STATE `find drivers/gpu/drm/gma500 -name \*.h -print`
> drivers/gpu/drm/gma500/psb_intel_reg.h:#define PIPEACONF_PIPE_STATE           (1 << 30)
> $
>
> Suggest new code
>
>         if ((temp & PIPEACONF_PIPE_STATE) != 0)
>             break;

Suggest looking at latest sources. ;)

Fixed by 67a3b63a54cb ("drm: gma500: fix logic error").

BR,
Jani.

--
Jani Nikula, Intel Open Source Technology Center
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20171024/c80fb881/attachment-0001.html>


More information about the dri-devel mailing list