summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv50_instmem.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2010-02-24 23:27:10 -0500
committerBen Skeggs <bskeggs@redhat.com>2010-02-25 15:09:46 +1000
commit3bfc7d22d0400e85a93e835d4398dcbe0af68b0b (patch)
tree0c055a016b8ee5f752a5ac079e69ba054f4ac064 /drivers/gpu/drm/nouveau/nv50_instmem.c
parentb30083bdb990bcc2829fce83d871a86059ff4fc1 (diff)
downloadop-kernel-dev-3bfc7d22d0400e85a93e835d4398dcbe0af68b0b.zip
op-kernel-dev-3bfc7d22d0400e85a93e835d4398dcbe0af68b0b.tar.gz
drm/nouveau: use ALIGN instead of open coding it
CC: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_instmem.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv50_instmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c
index f0dc4e3..de1f5b0 100644
--- a/drivers/gpu/drm/nouveau/nv50_instmem.c
+++ b/drivers/gpu/drm/nouveau/nv50_instmem.c
@@ -390,7 +390,7 @@ nv50_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj,
if (gpuobj->im_backing)
return -EINVAL;
- *sz = (*sz + (NV50_INSTMEM_PAGE_SIZE-1)) & ~(NV50_INSTMEM_PAGE_SIZE-1);
+ *sz = ALIGN(*sz, NV50_INSTMEM_PAGE_SIZE);
if (*sz == 0)
return -EINVAL;
OpenPOWER on IntegriCloud