aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drm_mem_util.h
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2012-06-10 22:52:10 +1000
committerJames Morris <james.l.morris@oracle.com>2012-06-10 22:52:10 +1000
commit66dd07b88a1c9d446f32253da606b87324fa620e (patch)
tree4e0971bdd543585c7ab46716ae808a7fd82f9c35 /include/drm/drm_mem_util.h
parentMerge branches 'next-queue' and 'next' into next (diff)
parentLinux 3.5-rc2 (diff)
downloadlinux-dev-66dd07b88a1c9d446f32253da606b87324fa620e.tar.xz
linux-dev-66dd07b88a1c9d446f32253da606b87324fa620e.zip
Merge commit 'v3.5-rc2' into next
Diffstat (limited to 'include/drm/drm_mem_util.h')
-rw-r--r--include/drm/drm_mem_util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/drm/drm_mem_util.h b/include/drm/drm_mem_util.h
index 6bd325fedc87..19a240446fca 100644
--- a/include/drm/drm_mem_util.h
+++ b/include/drm/drm_mem_util.h
@@ -31,7 +31,7 @@
static __inline__ void *drm_calloc_large(size_t nmemb, size_t size)
{
- if (size != 0 && nmemb > ULONG_MAX / size)
+ if (size != 0 && nmemb > SIZE_MAX / size)
return NULL;
if (size * nmemb <= PAGE_SIZE)
@@ -44,7 +44,7 @@ static __inline__ void *drm_calloc_large(size_t nmemb, size_t size)
/* Modeled after cairo's malloc_ab, it's like calloc but without the zeroing. */
static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size)
{
- if (size != 0 && nmemb > ULONG_MAX / size)
+ if (size != 0 && nmemb > SIZE_MAX / size)
return NULL;
if (size * nmemb <= PAGE_SIZE)