Commit f1051bff authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Kleber Sacilotto de Souza

drm: gma500: fix logic error

BugLink: https://bugs.launchpad.net/bugs/1811077

commit 67a3b63a upstream.

gcc-8 points out a condition that almost certainly doesn't
do what the author had in mind:

drivers/gpu/drm/gma500/mdfld_intel_display.c: In function 'mdfldWaitForPipeEnable':
drivers/gpu/drm/gma500/mdfld_intel_display.c:102:37: error: bitwise comparison always evaluates to false [-Werror=tautological-compare]

This changes it to a simple bit mask operation to check
whether the bit is set.

Fixes: 026abc33 ("gma500: initial medfield merge")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20170905074741.435324-1-arnd@arndb.deSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 42906b1d
...@@ -99,7 +99,7 @@ void mdfldWaitForPipeEnable(struct drm_device *dev, int pipe) ...@@ -99,7 +99,7 @@ void mdfldWaitForPipeEnable(struct drm_device *dev, int pipe)
/* Wait for for the pipe enable to take effect. */ /* Wait for for the pipe enable to take effect. */
for (count = 0; count < COUNT_MAX; count++) { for (count = 0; count < COUNT_MAX; count++) {
temp = REG_READ(map->conf); temp = REG_READ(map->conf);
if ((temp & PIPEACONF_PIPE_STATE) == 1) if (temp & PIPEACONF_PIPE_STATE)
break; break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment