From bdf539ad61a8d4d0f0b0865c030a8ecb1ec2a398 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 18 Dec 2008 16:56:11 +1000 Subject: [PATCH] drm/radeon: fix warning due to PAGE_SIZE max Signed-off-by: Dave Airlie --- drivers/gpu/drm/radeon/radeon_cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c index 7b37a4906377..4f5d1e996217 100644 --- a/drivers/gpu/drm/radeon/radeon_cp.c +++ b/drivers/gpu/drm/radeon/radeon_cp.c @@ -1777,7 +1777,7 @@ int radeon_master_create(struct drm_device *dev, struct drm_master *master) return -ENOMEM; /* prebuild the SAREA */ - sareapage = max(SAREA_MAX, PAGE_SIZE); + sareapage = max_t(unsigned long, SAREA_MAX, PAGE_SIZE); ret = drm_addmap(dev, 0, sareapage, _DRM_SHM, _DRM_CONTAINS_LOCK|_DRM_DRIVER, &master_priv->sarea); if (ret) { -- GitLab