]> git.baikalelectronics.ru Git - kernel.git/commit
drm: fix drm_get_max_iomem type mismatch
authorArnd Bergmann <arnd@arndb.de>
Thu, 22 Feb 2018 11:47:51 +0000 (12:47 +0100)
committerSean Paul <seanpaul@chromium.org>
Thu, 22 Feb 2018 16:18:58 +0000 (11:18 -0500)
commitf862a186eca1a41468ccc35ccaa34fac2a15c4d2
tree417f2aaba758e88d2f21898d79ad0129e58c4dac
parentbd39b7aded73dd0db8ba5094584214433caf4c0f
drm: fix drm_get_max_iomem type mismatch

When comparing two variables with min()/max(), they should be the same type:

drivers/gpu/drm/drm_memory.c: In function 'drm_get_max_iomem':
include/linux/kernel.h:821:16: error: comparison of distinct pointer types lacks a cast [-Werror]
  (void) (&max1 == &max2);

This makes the local variable in drm_get_max_iomem make the type
from resource->end.

Fixes: 0de65182e793 ("drm: add func to get max iomem address v2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180222114804.1394300-1-arnd@arndb.de
drivers/gpu/drm/drm_memory.c