aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDan Carpenter2010-12-20 12:26:26 +0300
committerBen Skeggs2010-12-21 11:53:32 +1000
commitd095e23206e6291cbde4b2937d1316a42d9e6440 (patch)
tree023278fe2a7c24fc602e09d96e72bd28f973045f /drivers
parentb08ebe7e776e5be0271ed1e1bbb384e1f29dd117 (diff)
drm/nouveau: sizeof() vs ARRAY_SIZE()
ARRAY_SIZE() was intended here, sizeof() is too large. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/nouveau/nv50_vram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_vram.c b/drivers/gpu/drm/nouveau/nv50_vram.c
index 47489ed0a5a8..58e98ad36347 100644
--- a/drivers/gpu/drm/nouveau/nv50_vram.c
+++ b/drivers/gpu/drm/nouveau/nv50_vram.c
@@ -42,7 +42,7 @@ nv50_vram_flags_valid(struct drm_device *dev, u32 tile_flags)
{
int type = (tile_flags & NOUVEAU_GEM_TILE_LAYOUT_MASK) >> 8;
- if (likely(type < sizeof(types) && types[type]))
+ if (likely(type < ARRAY_SIZE(types) && types[type]))
return true;
return false;
}