Commit d095e232 authored by Dan Carpenter's avatar Dan Carpenter Committed by Ben Skeggs

drm/nouveau: sizeof() vs ARRAY_SIZE()

ARRAY_SIZE() was intended here, sizeof() is too large.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent b08ebe7e
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment