From 4b560fde06aeb342f3ff0bce924627ab722d251a Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 19 Mar 2007 09:08:21 +1100 Subject: [PATCH] drm: fix warning in drm_fops.c drivers/char/drm/drm_fops.c: In function 'drm_setup': drivers/char/drm/drm_fops.c:60: warning: comparison of distinct pointer types lacks a cast Unfortunately PAGE_SIZE has different types on different architectures. Signed-off-by: Andrew Morton Signed-off-by: Dave Airlie --- drivers/char/drm/drm_fops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c index afe5f07f2e17..314abd9d6510 100644 --- a/drivers/char/drm/drm_fops.c +++ b/drivers/char/drm/drm_fops.c @@ -57,7 +57,7 @@ static int drm_setup(drm_device_t * dev) dev->magicfree.next = NULL; /* prebuild the SAREA */ - sareapage = max(SAREA_MAX, PAGE_SIZE); + sareapage = max_t(unsigned, SAREA_MAX, PAGE_SIZE); i = drm_addmap(dev, 0, sareapage, _DRM_SHM, _DRM_CONTAINS_LOCK, &map); if (i != 0) return i; -- 2.39.5