drm: fix warning in drm_fops.c
authorAndrew Morton <akpm@linux-foundation.org>
Sun, 18 Mar 2007 22:08:21 +0000 (09:08 +1100)
committerDave Airlie <airlied@linux.ie>
Sun, 18 Mar 2007 22:08:21 +0000 (09:08 +1100)
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 <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/char/drm/drm_fops.c

index afe5f07..314abd9 100644 (file)
@@ -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;